ROM Android: Porting F240K

From OnnoWiki
Jump to navigation Jump to search

Dapatkan /system/build.prop

mkdir backup-F240K
cd backup-F240K/

adb devices
adb pull /system/build.prop

Hasilnya

# begin build properties
# autogenerated by buildinfo.sh
led=50
fast_charge=0
imei=
ro.build.id=JDQ39E
ro.build.display.id=cm_geefhd_att_us-eng 4.2.2 JDQ39E eng.root.20140329.160704 test-keys
ro.build.version.incremental=4.5.18
ro.build.version.sdk=17
ro.build.version.codename=REL
ro.build.version.release=4.2.2
ro.build.date=2014年 03月 29日 星期六 16:08:01 CST
ro.build.date.utc=1396080481
ro.build.type=userdebug
ro.build.user=root
ro.build.host=ws008
ro.build.tags=release-keys
ro.product.model=LG-Optimus G Pro
ro.product.brand=LGE
ro.product.name=cm_geefhd_att_us
ro.product.device=geefhd_att_us
ro.product.board=geefhd
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=LGE
ro.product.locale.language=zh
ro.product.locale.region=CN
ro.wifi.channels=
ro.board.platform=msm8960
# ro.build.product is obsolete; use ro.product.device
ro.build.product=geefhd_att_us
# Do not try to parse ro.build.description or .fingerprint
ro.build.description=occam-user 4.2.2 JDQ39 573038 release-keys
ro.build.fingerprint=google/occam/mako:4.2.2/JDQ39/573038:user/release-keys
ro.build.characteristics=default
ro.cm.device=geefhd_att_us
# end build properties
#
# system.prop for geefhd_hk
#
rild.libpath=/system/lib/libril-qc-qmi-1.so
rild.libargs=-d /dev/smd0
persist.rild.nitz_plmn=
persist.rild.nitz_long_ons_0=
persist.rild.nitz_long_ons_1=
persist.rild.nitz_long_ons_2=
persist.rild.nitz_long_ons_3=
persist.rild.nitz_short_ons_0=
persist.rild.nitz_short_ons_1=
persist.rild.nitz_short_ons_2=
persist.rild.nitz_short_ons_3=
ril.subscription.types=NV,RUIM
DEVICE_PROVISIONED=1 

ro.hdmi.enable=true
lpa.decode=false
tunnel.decode=true
tunnel.audiovideo.decode=true
lpa.use-stagefright=true 

#system props for the MM modules

media.stagefright.enable-player=true
media.stagefright.enable-http=true
media.stagefright.enable-aac=true
media.stagefright.enable-qcp=true
media.stagefright.enable-fma2dp=true
media.stagefright.enable-scan=true
mmp.enable.3g2=true 

#
# Haptic
#
ro.haptic.vibrate_ex.enabled=0
sys.haptic.long.weak=0,0,1,15,20,0,21
sys.haptic.long.normal=0,0,1,35,20,0,21
sys.haptic.long.strong=0,0,1,80,30,0,21
sys.haptic.down.weak=0,15,5,-5,5
sys.haptic.down.normal=0,30,5,-5,5
sys.haptic.down.strong=0,80,10,-5,5
sys.haptic.up.weak=0,15,5,-5,5
sys.haptic.up.normal=0,0,5,-5,5
sys.haptic.up.strong=0,80,10,-5,5
sys.haptic.tap.weak=0,15,5,-5,5
sys.haptic.tap.normal=0,0,10,-5,5
sys.haptic.tap.strong=0,80,5,-5,5 

#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.rommanager.developerid=cyanogenmod
keyguard.no_require_sim=true
ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html
ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html
ro.com.google.clientidbase=android-google
ro.com.android.wifi-watchlist=GoogleGuest
ro.setupwizard.enterprise_mode=1
ro.com.android.dateformat=MM-dd-yyyy
ro.com.android.dataroaming=true
ro.cm.version=10.1-20140329-UNOFFICIAL-geefhd_att_us
ro.modversion=10.1-20140329-UNOFFICIAL-geefhd_att_us
ro.carrier=unknown
ro.opengles.version=131072
ro.sf.lcd_density=480
persist.audio.handset.mic=digital
persist.audio.fluence.mode=endfire
persist.audio.lowlatency.rec=false
af.resampler.quality=255
# System prop to select MPQAudioPlayer by default on mpq8064
mpq.audio.decode=true
persist.radio.apm_sim_not_pwdn=1
ro.telephony.call_ring.multiple=0
ro.telephony.ril_class=LgeLteRIL
ro.telephony.ril.v3=qcomdsds
ro.telephony.slowModem=1
debug.mdpcomp.maxlayer=2
persist.hwc.mdpcomp.enable=true
ro.qualcomm.bt.hci_transport=smd
drm.service.enabled=true
wifi.interface=wlan0
ap.interface=wlan0
media.aac_51_output_enabled=true
debug.prerotation.disable=1
debug.egl.recordable.rgba8888=1
dalvik.vm.heapstartsize=16m
dalvik.vm.heapgrowthlimit=192m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m
dalvik.vm.lockprof.threshold=500
telephony.lteOnCdmaDevice=0
telephony.lteOnGsmDevice=1
ro.telephony.default_network=0
ro.ril.def.preferred.network=0
dalvik.vm.dexopt-flags=m=y
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt
ro.miui.ui.version.code=3
ro.miui.ui.version.name=V5
ro.config.ringtone=MI.ogg
ro.config.notification_sound=FadeIn.ogg
ro.config.alarm_alert=GoodMorning.ogg
ro.config.sms_received_sound=FadeIn.ogg
ro.config.sms_delivered_sound=MessageComplete.ogg
#Increase the volume steps in-call
ro.config.vc_call_steps=20
wifi.supplicant_scan_interval=60
ro.telephony.call_ring.delay=0
#phone sleeps better
pm.sleep_mode=1
ro.product.mod_device=gpro_ws008
ro.skia.use_data_fonts=1

Diperoleh

ro.product.manufacturer=LGE > vendor lge
ro.product.name=cm_geefhd_att_us
ro.product.device=geefhd_att_us > codename geefhd_att_us (harusnya f240k)
ro.product.board=geefhd

Teliti Struktur Partisi

Lakukan

adb pull /proc/partitions

Hasilnya

major minor  #blocks  name

 179        0   30535680 mmcblk0
 179        1      65536 mmcblk0p1
 179        2        512 mmcblk0p2
 179        3        512 mmcblk0p3
 179        4       2048 mmcblk0p4
 179        5        512 mmcblk0p5
 179        6        512 mmcblk0p6
 179        7      24576 mmcblk0p7
 179        8        512 mmcblk0p8
 179        9          1 mmcblk0p9
 179       10       3072 mmcblk0p10
 179       11       3072 mmcblk0p11
 179       12        780 mmcblk0p12
 179       13        780 mmcblk0p13
 179       14        780 mmcblk0p14
 179       15       8192 mmcblk0p15
 179       16       8192 mmcblk0p16
 179       17          8 mmcblk0p17
 179       18      16384 mmcblk0p18
 179       19      16384 mmcblk0p19
 179       20       8192 mmcblk0p20
 179       21        512 mmcblk0p21
 179       22        512 mmcblk0p22
 179       23    2621440 mmcblk0p23
 179       24    1048576 mmcblk0p24
 179       25   24862720 mmcblk0p25
 179       26       8192 mmcblk0p26
 179       27     262144 mmcblk0p27
 179       28      24576 mmcblk0p28
 179       29       3072 mmcblk0p29
 179       30          8 mmcblk0p30
 179       31      32768 mmcblk0p31
 259        0      32768 mmcblk0p32
 259        1        512 mmcblk0p33
 259        2        512 mmcblk0p34
 259        3      16384 mmcblk0p35
 259        4          8 mmcblk0p36
 259        5          8 mmcblk0p37
 259        6      16384 mmcblk0p38
 259        7    1412063 mmcblk0p39
 179       32    3929088 mmcblk1
 179       33    3928064 mmcblk1p1

Lakukan

adb devices
adb shell
su
ls -l /dev/block/platform/msm_sdcc.1/by-name/ 

Hasilnya

lrwxrwxrwx root     root              1970-01-01 20:27 DDR -> /dev/block/mmcblk0p30
lrwxrwxrwx root     root              1970-01-01 20:27 aboot -> /dev/block/mmcblk0p5
lrwxrwxrwx root     root              1970-01-01 20:27 bnr -> /dev/block/mmcblk0p20
lrwxrwxrwx root     root              1970-01-01 20:27 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx root     root              1970-01-01 20:27 cache -> /dev/block/mmcblk0p24
lrwxrwxrwx root     root              1970-01-01 20:27 drm -> /dev/block/mmcblk0p15
lrwxrwxrwx root     root              1970-01-01 20:27 eksst -> /dev/block/mmcblk0p22
lrwxrwxrwx root     root              1970-01-01 20:27 encrypt -> /dev/block/mmcblk0p21
lrwxrwxrwx root     root              1970-01-01 20:27 factory -> /dev/block/mmcblk0p19
lrwxrwxrwx root     root              1970-01-01 20:27 fota -> /dev/block/mmcblk0p31
lrwxrwxrwx root     root              1970-01-01 20:27 fsg -> /dev/block/mmcblk0p29
lrwxrwxrwx root     root              1970-01-01 20:27 grow -> /dev/block/mmcblk0p39
lrwxrwxrwx root     root              1970-01-01 20:27 lcdlog -> /dev/block/mmcblk0p37
lrwxrwxrwx root     root              1970-01-01 20:27 m9kefs1 -> /dev/block/mmcblk0p12
lrwxrwxrwx root     root              1970-01-01 20:27 m9kefs2 -> /dev/block/mmcblk0p13
lrwxrwxrwx root     root              1970-01-01 20:27 m9kefs3 -> /dev/block/mmcblk0p14
lrwxrwxrwx root     root              1970-01-01 20:27 misc -> /dev/block/mmcblk0p18
lrwxrwxrwx root     root              1970-01-01 20:27 modem -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              1970-01-01 20:27 modemst1 -> /dev/block/mmcblk0p10
lrwxrwxrwx root     root              1970-01-01 20:27 modemst2 -> /dev/block/mmcblk0p11
lrwxrwxrwx root     root              1970-01-01 20:27 mpt -> /dev/block/mmcblk0p32
lrwxrwxrwx root     root              1970-01-01 20:27 pad -> /dev/block/mmcblk0p9
lrwxrwxrwx root     root              1970-01-01 20:27 persist -> /dev/block/mmcblk0p26
lrwxrwxrwx root     root              1970-01-01 20:27 rct -> /dev/block/mmcblk0p36
lrwxrwxrwx root     root              1970-01-01 20:27 recovery -> /dev/block/mmcblk0p28
lrwxrwxrwx root     root              1970-01-01 20:27 reserved -> /dev/block/mmcblk0p38
lrwxrwxrwx root     root              1970-01-01 20:27 rpm -> /dev/block/mmcblk0p6
lrwxrwxrwx root     root              1970-01-01 20:27 rpmbak -> /dev/block/mmcblk0p34
lrwxrwxrwx root     root              1970-01-01 20:27 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx root     root              1970-01-01 20:27 sbl2 -> /dev/block/mmcblk0p3
lrwxrwxrwx root     root              1970-01-01 20:27 sbl3 -> /dev/block/mmcblk0p4
lrwxrwxrwx root     root              1970-01-01 20:27 sns -> /dev/block/mmcblk0p16
lrwxrwxrwx root     root              1970-01-01 20:27 ssd -> /dev/block/mmcblk0p17
lrwxrwxrwx root     root              1970-01-01 20:27 system -> /dev/block/mmcblk0p23
lrwxrwxrwx root     root              1970-01-01 20:27 tombstones -> /dev/block/mmcblk0p27
lrwxrwxrwx root     root              1970-01-01 20:27 tz -> /dev/block/mmcblk0p8
lrwxrwxrwx root     root              1970-01-01 20:27 tzbak -> /dev/block/mmcblk0p33
lrwxrwxrwx root     root              1970-01-01 20:27 userdata -> /dev/block/mmcblk0p25
lrwxrwxrwx root     root              1970-01-01 20:27 ve -> /dev/block/mmcblk0p35


Beberapa partisi yang penting

boot       /dev/block/mmcblk0p7
recovery   /dev/block/mmcblk0p26
system     /dev/block/mmcblk0p23
cache      /dev/block/mmcblk0p24

Dapatkan boot.img

adb devices
adb shell
su

dd if=/dev/block/mmcblk0p7 of=/sdcard/boot.img
exit

Di laptop / pc lakukan

adb pull /sdcard/boot.img

Dapatkan recovery.img

adb devices
adb shell
su

dd if=/dev/block/mmcblk0p26 of=/sdcard/recovery.img
exit

Di laptop / pc lakukan

adb pull /sdcard/recovery.img


Dapatkan system.img dan cache.img

adb devices
adb shell
su

dd if=/dev/block/mmcblk0p23 of=/sdcard/system.img
dd if=/dev/block/mmcblk0p24 of=/sdcard/cache.img
exit

Di laptop / pc lakukan

adb pull /sdcard/system.img
adb pull /sdcard/cache.img


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

adb devices
adb pull /proc/config.gz
adb pull /proc/version


Menggunakan script mkvendor.sh untuk membuat file

Siapkan developer environment

cd ~/android-cyanogenmod
make -j4 otatools

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 lge f240k ~/backup-F240K/boot.img


Dimana

  • vendor adalah lge
  • codename adalah f240k
  • boot.img berada di ~/backup-F240K/boot.img

Perintah di atas akan membuat folder /device/lge/f240k/ dalam struktur repo source CyanogenMod. Dalam folder tersebut ada file AndroidBoard.mk, AndroidProducts.mk, BoardConfig.mk, cm.mk, device_[codename].mk, kernel (binary), recovery.fstab, dll

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