This is the porting guide of CyanogenMod base ROMs. Its prepared by Manoar Hossain Munna. Just follow this tutorial, you will be success. Inshallah
Process:
Unpack both boot.img Stock & cm12/cm12.1
For unpack Repack boot.img use this tool, just drag & drop boot.img on it.
link::
Download
1. extract that pc app named AndImgTool.exe in any folder on desktop also copy ur boot.img like boot_stock.img, boot_port.img,,
2. now drag n drop boot_stock.img on AndImgTool.exe,,
3. after complete do same thing for boot_port.img,,,
4. now u hav two folder of unpacked boot.img named boot_stock_ & boot_port_
5. now both boot.img has been unpacked,,
Use Stock zImage(Kernel) With Cm12 ramdisk
stock/ramdisk/ueventd.rc
compare lines of both ramdisk/default.prop then
Replace those line from stock boot.img/ramdisk/default.prop to cm12 boot.img/ramdisk/default.prop........
1. ro.secure=*
2. ro.allow.mock.location=*
3. ro.debuggable=*
Done
6. for repack just drag n drop that unpacked boot_port_ folder on AndImgTool.exe
Now, port system folder...
Delete & replace stock to port...
firmware from system/etc
libMali.so from system/lib
libcamdrv.so from system/lib
libcamalgo.so from system/lib
libcameracustom.so from system/lib
hw whole folder from system/lib
Edit build.prop by notepad++..
Change dpi,
ro.sf.lcd_density=*** (as ur Stock build.prop)
Rotation as ur device.
ro.sf.hwrotation=*** (use 0 or 180 as ur device)
META-INF folder:
Open meta-inf folder & locate updater-script META-INF\com\google\android, then open it with Notepad++
just change system & data (if available) block mounting point as ur device,
Compare mmcblk0p* with ur stock Rom Zip
format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0", "/system");
format("ext4", "EMMC", "/dev/block/mmcblk0p7", "0", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
#Now zip it & flash with Philz recovery 6.59 or TWRP 2.8.5 recovery.
Note:: if u got Stuck on starting app or bootloop then try this...
1. use boot.img of ur any booted cm12.1 based rom
2. use storeage-list.xml of that rom from which one u used boot.img,
directly push storeage-list.xml by winrar
#Bug fixing::
1) Sensor problem: take sensors.default.so from stock rename it to sensors.mt6582.so then replace it to system/lib/hw
Best of luck,, Happy Porting
Credit:
@Manoar Hossain Munna
@xda-developer
@google.com
Comments
Post a Comment