Difference between revisions of "ROM Android: Porting A80A"

From OnnoWiki
Jump to navigation Jump to search
Line 624: Line 624:
  
 
==Siapkan Kernel==
 
==Siapkan Kernel==
 +
 +
Sumber source code kernel mediatek
 +
 +
* https://android.googlesource.com/kernel/mediatek/
 +
* https://android.googlesource.com/kernel/mediatek/+/android-4.4.4_r4
 +
* https://android.googlesource.com/kernel/mediatek/+/android-4.4.4_r3
 +
 +
cd ~
 +
git clone https://android.googlesource.com/kernel/mediatek -b android-mediatek-sprout-3.4-kitkat-mr2
 +
 +
Hasilnya
 +
 +
Cloning into 'mediatek'...
 +
remote: Sending approximately 516.28 MiB ...
 +
remote: Counting objects: 43838, done
 +
remote: Finding sources: 100% (54/54)
 +
Receiving objects: 100% (2472039/2472039), 516.18 MiB | 33.00 KiB/s, done.
 +
remote: Total 2472039 (delta 2079684), reused 2472008 (delta 2079684)
 +
Resolving deltas: 100% (2080161/2080161), done.
 +
Checking connectivity... done.
 +
Checking out files: 100% (41604/41604), done.
 +
 +
Hasilnya akan di simpan di folder
 +
 +
cd ~
 +
mediatek
 +
 +
Siapkan folder di source android
  
 
  cd ~/android-cyanogenmod/kernel/
 
  cd ~/android-cyanogenmod/kernel/
  mkdir mediatek
+
  cp -Rf ~/mediatek ~/android-cyanogenmod/kernel/
 
 
  
 
==Compile==
 
==Compile==

Revision as of 08:49, 6 January 2015

Dapatkan /system/build.prop

mkdir backup-A80A
cd backup-A80A/

adb devices
adb pull /system/build.prop

Hasilnya

# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=JDQ39
ro.build.display.id=EVERCOSS_V1.0_0601
ro.build.version.incremental=20140108.173524
ro.custom.build.version=1402409603
ro.build.version.sdk=17
ro.build.version.codename=REL
ro.build.version.release=4.2.2
ro.build.date=2014年 06月 10日 星期二 22:18:31 CST
ro.build.date.utc=1402409911
ro.build.type=user
ro.build.user=yangning
ro.build.innner.version=SW_W99601A4_V004_M10_EVERCOSS
ro.build.host=yubosong-desktop
ro.build.tags=test-keys
ro.product.model=A80A
ro.product.brand=EVERCOSS
ro.product.name=a80a
ro.product.device=a80a
ro.product.board=a80a
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=EVERCOSS
ro.product.locale.language=en
ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=
ro.build.hardware.version=P1
ro.build.customer=EVERCOSS
# ro.build.product is obsolete; use ro.product.device
ro.build.product=a80a
# Do not try to parse ro.build.description or .fingerprint
ro.build.description=wt99601-user 4.2.2 JDQ39 eng.yangning.1402409603 test-keys
ro.build.fingerprint=EVERCOSS/a80a/a80a:4.2.2/JDQ39/20140108.173524:user/test-keys
ro.build.flavor=
ro.build.characteristics=default
# end build properties 

# begin mediatek build properties
ro.mediatek.version.release=SW_W99601A4_V004_M10_EVERCOSS
ro.mediatek.platform=MT6592
ro.mediatek.chip_ver=S01
ro.mediatek.version.branch=ALPS.JB9.MP
ro.mediatek.version.sdk=1
# end mediatek build properties
#
# system.prop for generic sdk
#

rild.libpath=/system/lib/mtk-ril.so
rild.libargs=-d /dev/ttyC0 

# MTK, Infinity, 20090720 {
wifi.interface=wlan0
# MTK, Infinity, 20090720 } 

# MTK, mtk03034, 20101210 {
ro.mediatek.wlan.wsc=1
# MTK, mtk03034 20101210}
# MTK, mtk03034, 20110318 {
ro.mediatek.wlan.p2p=1
# MTK, mtk03034 20110318}

# MTK, mtk03034, 20101213 {
mediatek.wlan.ctia=0
# MTK, mtk03034 20101213}

#
wifi.tethering.interface=ap0
#

ro.opengles.version=131072 

wifi.direct.interface=p2p0
dalvik.vm.heapgrowthlimit=128m
dalvik.vm.heapsize=256m 

# USB MTP WHQL
ro.sys.usb.mtp.whql.enable=0 

# Power off opt in IPO
sys.ipo.pwrdncap=2 

# Switching Menu of Mass storage and MTP
ro.sys.usb.storage.type=mtp,mass_storage

# USB BICR function
ro.sys.usb.bicr=yes

# USB Charge only function
ro.sys.usb.charging.only=yes

# audio
ro.camera.sound.forced=0
ro.audio.silent=0

ro.zygote.preload.enable=0
# temporary enables NAV bar (soft keys)
qemu.hw.mainkeys=1

ro.ota.xml_url=http://update.archos.com/update_archos_gen8_daos.xml
ro.ota.xml_prefix=http://update.archos.com/AFMv1/storage/xml/update_
ro.ota.product_name=a80a
ro.ota.product_device=a80a
ro.ota.firmware_file_basename=update
ro.ota.firmware_file_extension=zip 

ro.com.google.clientidbase=android-archos
ro.operator.optr=CUST
#
# ADDITIONAL_BUILD_PROPERTIES
#
persist.gemini.sim_num=2
ro.gemini.smart_sim_switch=false
ro.gemini.smart_3g_switch=0
ril.specific.sm_cause=0
bgw.current3gband=0
ro.build.display.wtid=SW_W99601A4_V004_M10_EVERCOSS
ril.external.md=0
ro.btstack=blueangel
ro.sf.hwrotation=0
ril.current.share_modem=2
launcherplus.allappsgrid=2d
launcher2.allappsgrid=3d_20
curlockscreen=1
ro.mediatek.gemini_support=true
persist.radio.fd.counter=15
persist.radio.fd.off.counter=5
persist.radio.fd.r8.counter=15
persist.radio.fd.off.r8.counter=5
persist.mtk.wcn.combo.chipid=-1
drm.service.enabled=true
fmradio.driver.enable=1
ril.first.md=1
ril.flightmode.poweroffMD=1
ril.telephony.mode=0
dalvik.vm.mtk-stack-trace-file=/data/anr/mtk_traces.txt
persist.mtk.anr.mechanism=1
mediatek.wlan.chip=MTK_CONNSYS_MT6592
mediatek.wlan.module.postfix=_mtk_connsys_mt6592
ril.radiooff.poweroffMD=0
ro.config.notification_sound=Proxima.ogg
ro.config.alarm_alert=Alarm_Classic.ogg
ro.config.ringtone=Backroad.ogg
ter.service.enable=0
persist.sys.display.clearMotion=1
persist.clearMotion.fblevel.nrm=255
persist.clearMotion.fblevel.bdr=255
ro.setupwizard.mode=OPTIONAL
ro.com.google.gmsversion=4.2_r4
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt 

# begin adupsfota properties
ro.adups.fota.oem=MTK88_92
ro.adups.fota.device=A80A
ro.adups.fota.version=EVERCOSS_V1.0_0601
# begin adupsfota properties


Diperoleh

ro.product.manufacturer=EVERCOSS > vendor evercoss
ro.product.device=a80a > codename a80a

Teliti Struktur Partisi

Lakukan

adb pull /proc/dumchar_info

Hasilnya

Part_Name	Size	StartAddr	Type	MapTo	Region
preloader    0x0000000000040000   0x0000000000000000   2   /dev/misc-sd     BOOT_1
mbr          0x0000000000080000   0x0000000000000000   2   /dev/block/mmcblk0     USER
ebr1         0x0000000000080000   0x0000000000080000   2   /dev/block/mmcblk0p1   USER
pro_info     0x0000000000300000   0x0000000000100000   2   /dev/block/mmcblk0     USER
nvram        0x0000000000500000   0x0000000000400000   2   /dev/block/mmcblk0     USER
protect_f    0x0000000000a00000   0x0000000000900000   2   /dev/block/mmcblk0p2   USER
protect_s    0x0000000000a00000   0x0000000001300000   2   /dev/block/mmcblk0p3   USER
seccfg       0x0000000000040000   0x0000000001d00000   2   /dev/block/mmcblk0     USER
uboot        0x0000000000060000   0x0000000001d40000   2   /dev/block/mmcblk0     USER
bootimg      0x0000000000a00000   0x0000000001da0000   2   /dev/block/mmcblk0     USER
recovery     0x0000000000a00000   0x00000000027a0000   2   /dev/block/mmcblk0     USER
sec_ro       0x0000000000600000   0x00000000031a0000   2   /dev/block/mmcblk0p4   USER
misc         0x0000000000080000   0x00000000037a0000   2   /dev/block/mmcblk0     USER
logo         0x0000000000800000   0x0000000003820000   2   /dev/block/mmcblk0     USER
ebr2         0x0000000000080000   0x0000000004020000   2   /dev/block/mmcblk0     USER
expdb        0x0000000000f60000   0x00000000040a0000   2   /dev/block/mmcblk0     USER
android      0x0000000032000000   0x0000000005000000   2   /dev/block/mmcblk0p5   USER
cache        0x0000000008000000   0x0000000037000000   2   /dev/block/mmcblk0p6   USER
usrdata      0x00000001c0000000   0x000000003f000000   2   /dev/block/mmcblk0p7   USER
fat          0x00000001a3900000   0x00000001ff000000   2   /dev/block/mmcblk0p8   USER
bmtpool      0x0000000001500000   0x00000000ffff00a8   2   /dev/block/mmcblk0     USER
Part_Name:Partition name you should open;
Size:size of partition
StartAddr:Start Address of partition;
Type:Type of partition(MTD=1,EMMC=2)
MapTo:actual device you operate

Lakukan

adb pull /proc/partitions

Hasilnya

major minor  #blocks  name

   7        0       1254 loop0
 253        0     524288 zram0
 179        0   15246336 mmcblk0
 179        1          1 mmcblk0p1
 179        2      10240 mmcblk0p2
 179        3      10240 mmcblk0p3
 179        4       6144 mmcblk0p4
 179        5     819200 mmcblk0p5
 179        6     131072 mmcblk0p6
 179        7    7340032 mmcblk0p7
 179        8    6874112 mmcblk0p8
 179       64       4096 mmcblk0boot1
 179       32       4096 mmcblk0boot0
 179       96    7802880 mmcblk1
 179       97    7798784 mmcblk1p1


Lakukan

adb shell
ls -l /dev/block/platform/mtk-msdc.0/


Hasilnya

drwxr-xr-x root     root              2014-12-30 11:36 by-num
lrwxrwxrwx root     root              2014-12-30 11:36 mmcblk0 -> /dev/block/mmcblk0
lrwxrwxrwx root     root              2014-12-30 11:36 mmcblk0boot0 -> /dev/block/mmcblk0boot0
lrwxrwxrwx root     root              2014-12-30 11:36 mmcblk0boot1 -> /dev/block/mmcblk0boot1
lrwxrwxrwx root     root              2014-12-30 11:36 mmcblk0p1 -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              2014-12-30 11:36 mmcblk0p2 -> /dev/block/mmcblk0p2
lrwxrwxrwx root     root              2014-12-30 11:36 mmcblk0p3 -> /dev/block/mmcblk0p3
lrwxrwxrwx root     root              2014-12-30 11:36 mmcblk0p4 -> /dev/block/mmcblk0p4
lrwxrwxrwx root     root              2014-12-30 11:36 mmcblk0p5 -> /dev/block/mmcblk0p5
lrwxrwxrwx root     root              2014-12-30 11:36 mmcblk0p6 -> /dev/block/mmcblk0p6
lrwxrwxrwx root     root              2014-12-30 11:36 mmcblk0p7 -> /dev/block/mmcblk0p7
lrwxrwxrwx root     root              2014-12-30 11:36 mmcblk0p8 -> /dev/block/mmcblk0p8

Beberapa partisi yang penting

boot0    /dev/block/mmcblk0boot0
boot1    /dev/block/mmcblk0boot1
uboot    /dev/block/mmcblk0
bootimg  /dev/block/mmcblk0
recovery /dev/block/mmcblk0
android  /dev/block/mmcblk0p5
cache    /dev/block/mmcblk0p6
usrdata  /dev/block/mmcblk0p7

Teliti dmesg

Hasil dmesg juga akan menolong saat compile kernel. Lakukan

adb devices
adb shell
su

Karena hasilnya akan panjang sebaiknya di simpan di /sdcard

dmesg > /sdcard/dmesg.txt

Dari komputer dapat kita adb pull

adb pull /sdcard/dmesg.txt

Beberapa catatan dmesg di awal antara lain adalah

00/0xdf334000)(#8/not empty) leader: state(1) exit_state(0) tsk: signal->flags=0x0 group_exit_code=0x0
<6>[162563.430855] (0)[28745:GCMWriter]socket_close[529779] 
<4>[162563.430866] (0)[28745:GCMWriter][usktrk] socket close[529779] 
<6>[162563.430921] (0)[526:netd] sockdbg: recvmsg[528678:null]:exit read due to peer shutdown  
<6>[162563.430937] (0)[526:netd]socket_close[528678] 
<4>[162563.430946] (0)[526:netd][usktrk] socket close[528678] 
<4>[162563.645807] (0)[0:swapper/0][printk_delayed:start]
<4>[162563.645827] (0)[0:swapper/0][WDK], local_bit:0x0, cpu:0,RT[162563635931248]
<4>[162563.645834] (0)[0:swapper/0][WDK], local_bit:0x1, cpu:0, check bit0x:3,RT[162563635937479]
<4>[162563.645841] (0)[0:swapper/0][thread:93][RT:162563635944479] 2015-01-02 00:04:56.980903 UTC; android time 2015-01-02 07:04:56.980903
<4>[162563.645860] (0)[0:swapper/0][printk_delayed:done]
<4>[162563.665796] (1)[0:swapper/1][printk_delayed:start]
<4>[162563.665811] (1)[0:swapper/1][WDK], local_bit:0x1, cpu:1,RT[162563656035864]
<4>[162563.665819] (1)[0:swapper/1][WDK], local_bit:0x3, cpu:1, check bit0x:3,RT[162563656040325]
<4>[162563.665826] (1)[0:swapper/1][WDK]: kick Ex WDT,RT[162563656043479]
<4>[162563.665833] (1)[0:swapper/1][thread:94][RT:162563656048325] 2015-01-02 00:04:57.1009 UTC; android time 2015-01-02 07:04:57.1009
<4>[162563.665852] (1)[0:swapper/1][printk_delayed:done]
<4>[162564.315842] (0)[0:swapper/0]active: 281736, inactive: 203316
<4>[162564.315863] (0)[0:swapper/0][mlog] Node 0, zone   Normal 
<4>[162564.315875] (0)[0:swapper/0][mlog] Node 0, zone  HighMem 
<4>[162564.315887] (0)[0:swapper/0][mlog]: normal zone:
<4>[162564.315897] (0)[0:swapper/0]  1474   1295    683   1224    229      7      0      0      0      0      0 
<4>[162564.315947] (0)[0:swapper/0][mlog]: high zone:
<4>[162564.315957] (0)[0:swapper/0]   562   3736   1456    211     31      9      9      4      4      2      1 
<4>[162565.315838] (0)[0:swapper/0]active: 281736, inactive: 203316
<4>[162565.315857] (0)[0:swapper/0][mlog] Node 0, zone   Normal 
<4>[162565.315870] (0)[0:swapper/0][mlog] Node 0, zone  HighMem 
<4>[162565.315881] (0)[0:swapper/0][mlog]: normal zone:
<4>[162565.315891] (0)[0:swapper/0]  1474   1295    683   1224    229      7      0      0      0      0      0 
<4>[162565.315940] (0)[0:swapper/0][mlog]: high zone:
<4>[162565.315950] (0)[0:swapper/0]   562   3736   1456    211     31      9      9      4      4      2      1 
<7>[162565.550029] (0)[28745:GCMWriter][28745:GCMWriter] fork [28747:GCMWriter]
<4>[162566.315844] (0)[0:swapper/0]active: 281736, inactive: 203316
<4>[162566.315869] (0)[0:swapper/0][mlog] Node 0, zone   Normal 
<4>[162566.315882] (0)[0:swapper/0][mlog] Node 0, zone  HighMem 
<4>[162566.315893] (0)[0:swapper/0][mlog]: normal zone:
<4>[162566.315903] (0)[0:swapper/0]  1474   1294    683   1224    229      7      0      0      0      0      0 
<4>[162566.315954] (0)[0:swapper/0][mlog]: high zone: 
..
..
dst


Beberapa catatan dmesg yang mengandung MTK antara lain adalah

<6>[162691.218680] (0)[1:init]init: PropSet [dalvik.vm.mtk-vm-version:0x01] Start>>
<6>[162691.218797] (0)[1:init]init: PropSet [dalvik.vm.mtk-vm-version:0x01] Done
<3>[162723.455990] (0)[27605:kworker/0:1][WMT-LIB][E]wmt_lib_is_therm_ctrl_support(1175):thermal command can not be send: STP is not ready
<3>[162723.456007] (0)[27605:kworker/0:1][WMT-EXP][E]mtk_wcn_wmt_therm_ctrl(211):thermal ctrl function not supported
<3>[162723.456023] (0)[27605:kworker/0:1][WMT-LIB][E]wmt_lib_is_therm_ctrl_support(1175):thermal command can not be send: STP is not ready
<3>[162723.456039] (0)[27605:kworker/0:1][WMT-EXP][E]mtk_wcn_wmt_therm_ctrl(211):thermal ctrl function not supported
<3>[162723.456055] (0)[27605:kworker/0:1][WMT-LIB][E]wmt_lib_is_therm_ctrl_support(1175):thermal command can not be send: STP is not ready
<3>[162723.456071] (0)[27605:kworker/0:1][WMT-EXP][E]mtk_wcn_wmt_therm_ctrl(211):thermal ctrl function not supported
<3>[162723.456090] (0)[27605:kworker/0:1][WMT-DEV][I]wmt_dev_tm_temp_query:[Thermal] current_temp = 0x0
<5>[162730.186056] (0)[67:bat_thread_kthr][Power/Battery] [Battery] mt_battery_100percent_tracking(), Charging full first UI(100), reset(0) 

Catatan ini di perlukan untuk mengidentifikasi module yang harus di compile

Teliti Modules yang perlu di perhatikan

Lakukan dari komputer / PC

adb devices
adb shell ls /sys/modul | more

Dari hasil yang keluar tampaknya file berikut ini penting, terutama saat mengcompile Custom ROM

ccci
ccci_plat
hid
hid_apple
hid_ntrig
mali
mtk_fm_drv
mtk_stp_bt_soc
mtk_stp_gps_soc
mtk_stp_wmt_soc
mtk_wmt_detect
mtk_wmt_wifi_soc
scsi_wait_scan
wlan_mt.ko

Jika ingin di simpan dapat menggunakan perintah

adb shell ls /sys/module > modules.txt

Dapatkan boot.img dan ramdisk.gz

adb devices
adb shell
su

dd if=/dev/block/mmcblk0boot0 of=/sdcard/boot0.img
dd if=/dev/block/mmcblk0boot1 of=/sdcard/boot1.img
exit

Di laptop / pc lakukan

adb pull /sdcard/boot0.img
adb pull /sdcard/boot1.img


Jika Beruntung Memperoleh upgrade ROM

cp evercoss_A80A.zip ~
cd ~
unzip evercoss_A80A.zip 
cd evercoss_A80A/
unrar x SW_W99601A4_V011_M10_EVERCOSS_KK\(A80A_1016\).rar
cd ~/evercoss_A80A/SW_W99601A4_V011_M10_EVERCOSS_KK/Software/

Kita membutuhkan

lk.bin
boot.img


Extrak dari boot.img upgrade ROM MTK

Download dari

https://github.com/bgcngm/mtk-tools/

Caranya

cd ~/Downloads
wget https://github.com/bgcngm/mtk-tools/archive/master.zip
mv master.zip MTK-tools.zip

Buka

unzip MTK-tools.zip

unpack boot.img dari upgrade ROM MTK

cd ~/lokasi-upgrade-ROM-MTK/
~/Downloads/mtk-tools-master/unpack-MTK.pl boot.img
gzip -cr boot.img-ramdisk > boot.img-ramdisk.gz  (tampaknya gz yang di hasilkan salah)

Ini akan menghasilkan

boot.img
boot.img-args.txt
boot.img-kernel
boot.img-kernel.img
boot.img-ramdisk/
boot.img-ramdisk.gz (tampaknya gz yang di hasilkan salah)

Dapatkan recovery.img

Download dari

https://github.com/bgcngm/mtk-tools/

Caranya

cd ~/Downloads
wget https://github.com/bgcngm/mtk-tools/archive/master.zip

Buka

cd ~/Downloads
unzip mtk-tools-master.zip

unpack boot.img dari upgrade ROM MTK

cd ~/lokasi-upgrade-ROM-MTK/
~/Downloads/mtk-tools-master/unpack-MTK.pl TWRP_2810_Micromax_A350_KK.img 

Hasilnya

MTK-Tools by Bruno Martins
MTK unpack script (last update: 30-12-2014)

Valid Android signature found...

Input file information:

 Header:

  Boot magic:			ANDROID!
  Kernel size (bytes):		5076992		(0x004d7800)
  Kernel load address:		0x10008000

  Ramdisk size (bytes):		4099097		(0x003e8c19)
  Ramdisk load address:		0x11000000
  Second stage size (bytes):	0		(0x00000000)
  Second stage load address:	0x10f00000 

  Tags address:			0x10000100
  Page size (bytes):		2048		(0x00000800)
  ASCIIZ product name:		
  Command line:			
  ID:				b2fff3b00c887fac7dd1eb1b1615b1817f6adec3

 Other:

  Boot magic offset:		0x00000000
  Base address:			0x10000000

  Kernel offset:		0x00008000
  Ramdisk offset:		0x01000000
  Second stage offset:		0x00f00000
  Tags offset:			0x00000100

Extra arguments written to 'TWRP_2810_Micromax_A350_KK.img-args.txt'
Kernel written to 'TWRP_2810_Micromax_A350_KK.img-kernel.img'
Ramdisk size: 13717 blocks
Extracted ramdisk contents to directory 'TWRP_2810_Micromax_A350_KK.img-ramdisk'

Successfully unpacked kernel and ramdisk.

Dapatkan /proc/config.gz dan /proc/version

adb devices
adb pull /proc/version

Tampaknya config.gz tidak tersedia di MTK

Menggunakan script mkvendor.sh untuk membuat file

Siapkan developer environment

cd ~/android-cyanogenmod
make -j4 otatools
export PATH=${PATH}:~/android-cyanogenmod/out/host/linux-x86/bin

Agar tidak ada error sebagai berikut

"unpackbootimg not found.
Is your android build environment set up and have the host tools been built?"

Buat secara automatis semua directory cyanogenmod yang dibutuhkan

cd ~/android-cyanogenmod
./build/tools/device/mkvendor.sh evercoss a80a ~/backup-A80A/KK-upgrade/boot.img

Dimana

  • vendor adalah evercoss
  • codename adalah a80a
  • boot.img berada di ~/backup-A80A/KK-upgrade/

Jika anda menggunakan recovery image

cd ~/android-cyanogenmod
./build/tools/device/mkvendor.sh evercoss a80a ~/backup-A80A/micromax-A350/TWRP_2810_Micromax_A350_KK.img

Dimana

  • vendor adalah evercoss
  • codename adalah a80a
  • recovery.img berada di ~/backup-A80A/micromax-A350/TWRP_2810_Micromax_A350_KK.img


entah kenapa boot.img-ramdisk.gz selalu dapat error dari gzip. Lakukan hack sedikit

mkdir -p /tmp/onno/bootimg/ramdisk/
cp -Rf /home/onno/backup-A80A/KK-upgrade/boot.img-ramdisk/* /tmp/onno/bootimg/ramdisk/
cp ./build/tools/device/mkvendor.sh ./build/tools/device/mkvendor.sh.asli
vi ./build/tools/device/mkvendor.sh

Ubah

mkdir ramdisk
pushd ramdisk > /dev/null
gunzip -c ../$BOOTIMAGEFILE-ramdisk.gz | cpio -i

Menjadi

mkdir ramdisk
pushd ramdisk > /dev/null
cp -Rf /home/onno/backup-A80A/micromax-A350/TWRP_2810_Micromax_A350_KK.img-ramdisk/* /tmp/onno/bootimg/ramdisk/

Buat secara automatis semua directory cyanogenmod yang dibutuhkan

cd ~/android-cyanogenmod
./build/tools/device/mkvendor.sh evercoss a80a ~/backup-A80A/micromax-A350/TWRP_2810_Micromax_A350_KK.img

Dimana

  • vendor adalah evercoss
  • codename adalah a80a
  • boot.img berada di ~/backup-A80A/micromax-A350/TWRP_2810_Micromax_A350_KK.img

Ulangi dengan

cp -Rf /home/onno/backup-A80A/micromax-A350/TWRP_2810_Micromax_A350_KK.img-ramdisk/* /tmp/onno/bootimg/ramdisk/
cd ~/android-cyanogenmod
./build/tools/device/mkvendor.sh evercoss a80a ~/backup-A80A/micromax-A350/TWRP_2810_Micromax_A350_KK.img
rm -Rf /home/onno/android-cyanogenmod/device/evercoss/
cd ~/android-cyanogenmod
./build/tools/device/mkvendor.sh evercoss a80a ~/backup-A80A/micromax-A350/TWRP_2810_Micromax_A350_KK.img

Hasilnya

Output will be in /home/onno/android-cyanogenmod/device/evercoss/a80a
Creating initial git repository.
~/android-cyanogenmod/device/evercoss/a80a ~/android-cyanogenmod
Initialized empty Git repository in /home/onno/android-cyanogenmod/device/evercoss/a80a/.git/
[master (root-commit) d398507] mkvendor.sh: Initial commit of a80a
 8 files changed, 103 insertions(+)
 create mode 100644 AndroidBoard.mk
 create mode 100644 AndroidProducts.mk
 create mode 100644 BoardConfig.mk
 create mode 100644 cm.mk
 create mode 100644 device_a80a.mk
 create mode 100644 kernel
 create mode 100644 recovery.fstab
 create mode 100644 system.prop
~/android-cyanogenmod
Done!
Use the following command to set up your build environment:
  lunch cm_a80a-eng
And use the follwowing command to build a recovery:
  . build/tools/device/makerecoveries.sh cm_a80a-eng

Perintah di atas akan membuat folder

/device/evercoss/a80a/

dalam struktur repo source CyanogenMod. Dalam folder tersebut ada file

AndroidBoard.mk
AndroidProducts.mk
BoardConfig.mk
cm.mk
device_a80a.mk
kernel
recovery.fstab
system.prop

Langkah di atas tidak akan membuat directory kernel/ . Kita perlu melakukannya nanti, saat kita sudah siap untuk membuat kernel.

Siapkan Kernel

Sumber source code kernel mediatek

cd ~
git clone https://android.googlesource.com/kernel/mediatek -b android-mediatek-sprout-3.4-kitkat-mr2

Hasilnya

Cloning into 'mediatek'...
remote: Sending approximately 516.28 MiB ...
remote: Counting objects: 43838, done
remote: Finding sources: 100% (54/54)
Receiving objects: 100% (2472039/2472039), 516.18 MiB | 33.00 KiB/s, done.
remote: Total 2472039 (delta 2079684), reused 2472008 (delta 2079684)
Resolving deltas: 100% (2080161/2080161), done.
Checking connectivity... done.
Checking out files: 100% (41604/41604), done.

Hasilnya akan di simpan di folder

cd ~
mediatek

Siapkan folder di source android

cd ~/android-cyanogenmod/kernel/
cp -Rf ~/mediatek ~/android-cyanogenmod/kernel/

Compile

cd ~/android-cyanogenmod/vendor/cm
./get-prebuilts

cd ~/android-cyanogenmod
source build/envsetup.sh
lunch cm_a80a-eng
lunch cm_a80a-userdebug

Hasilnya

Trying dependencies-only mode on a non-existing device tree?

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.4
CM_VERSION=11-20150101-UNOFFICIAL-a80a
TARGET_PRODUCT=cm_a80a
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=KTU84Q
OUT_DIR=/home/onno/android-cyanogenmod/out
============================================


Tampaknya cm_a80a-eng tidak akan bisa karena a80a bukan OFFICIAL CM, maka keluar error

 Trying dependencies-only mode on a non-existing device tree?

Coba


cd ~/android-cyanogenmod
source build/envsetup.sh
lunch full_a80a-eng

Beberapa mka

Beberapa make yang perlu di coba


cd ~/android-cyanogenmo
source build/envsetup.sh
mka checkbuild
mka ramdisk
mka factory_ramdisk
mka factory_bundle
mka systemtarball
mka boottarball
mka userdataimage
mka userdatatarball
mka cacheimage
mka vendorimage
mka bootimage
mka all_modules


Hasil mka bootimage

Ujicoba

mka bootimage

Hasilnya

find: `bootable/recovery/res-720': No such file or directory
No private recovery resources for TARGET_DEVICE a80a
build/core/tasks/kernel.mk:63: ***************************************************************
build/core/tasks/kernel.mk:64: * Using prebuilt kernel binary instead of source              *
build/core/tasks/kernel.mk:65: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED                *
build/core/tasks/kernel.mk:66: * Please configure your device to download the kernel         *
build/core/tasks/kernel.mk:67: * source repository to kernel/evercoss/a80a
build/core/tasks/kernel.mk:68: * See http://wiki.cyanogenmod.org/w/Doc:_integrated_kernel_building
build/core/tasks/kernel.mk:69: * for more information                                        *
build/core/tasks/kernel.mk:70: ***************************************************************
build/core/tasks/kernel.mk:199: warning: overriding commands for target `/home/onno/android-cyanogenmod/out/target/product/a80a/kernel'
build/core/Makefile:44: warning: ignoring old commands for target `/home/onno/android-cyanogenmod/out/target/product/a80a/kernel'
make: *** No rule to make target `bootimg'.  Stop.

Ini menandakan bahwa prebuild kernel tidak lagi dimungkinkan di Cyanogenmod.

Referensi