Difference between revisions of "ROM Android: Porting A80A"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 508: | Line 508: | ||
mka bootimage | mka bootimage | ||
mka all_modules | 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. |
Revision as of 13:41, 1 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
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
Untuk A80A susah mendapatkan recovery.img dari device. Akan lebih mudah kalau dari 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
recovery.img
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/
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/KK-upgrade/boot.img-ramdisk/* /tmp/onno/bootimg/ramdisk/
Lakukan lagi
cd ~/android-cyanogenmod rm -Rf device/evercoss/ ./build/tools/device/mkvendor.sh evercoss a80a ~/backup-A80A/KK-upgrade/boot.img
Hasilnya kira-kira
[master (root-commit) e86853d] mkvendor.sh: Initial commit of a80a 8 files changed, 96 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.
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.