[GUIDE]Porting All Kind of Mediatek(All Chipset)
Almost Any Device to Any Device!
This guide will let you learn on how to port ROMS of the same CPU.
And also Porting from Different SoCs.
Only Works for
(ICS to ICS, JB to JB)
MT6589 To MT6577
MT6582 To MT6572
MT6577 To MT6575
MT6572 To MT6572
Requirements
-Notepad++ √
-PC(Windows 7/8/9) √
-7-zip √
-Bootimg(Unpack/Repack for Windows) √
-Stock Rom √
-Custom Rom √
-Brain √
Porting same SoCs
(MT6572 To MT6572)
Replace all of this file from your STOCK To your selected Custom Rom(call it PORT)
*system/vendor
*system/usr
*system/lib/modules
*system/lib/hw
*system/lib/libncurses.so(nvm it if you don't have)
*system/etc/firmware
*system/etc/bluetooth
*system/etc/vold.fstab
*system/etc/vold.fstab.nand
*boot.img(you can also get it in your back up file from the CWM)
For Fixing Problems
*system/etc/permissions
*system/etc/security
*system/etc/audio
*system/etc/wifi
*system/lib/drm
*system/lib/audio
*system/lib/libaudio.primary.default.so
*system/lib/libcamalgo.so
*Then open the PORT Rom and open ~META-INF/google/android/updater-script in your Notepad++
*Do the same for the STOCK Rom
Now in the PORT's updater-script, find a line that starts with this...
format(".......
mount("........
and only replace themmcblk0p_ with the stock one.
You don't understand??
See this one---
This is from the PORT one!
format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "0", "/system"); This one is from the STOCK one!
format("ext4", "EMMC", "/dev/block/mmcblk0p3", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "0", "/system");
Just replace the last number of every mmcblk0p# from STOCK to PORT.
And then, your PORT's updater-script should look like this:
format("ext4", "EMMC", "/dev/block/mmcblk0p3", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "0", "/system");
NOTE: Do not replace the whole line, only the #
Now go back to the folder of PORT Rom and you will see this files
-META-INF
-system
-boot.img
Now select this 3 files and then right click your mouse and choose 7-zip
-->Add to Archieve<--
And a dialogue box should appear.
Configure the format like this:
Archieve format: ZIP
Compression Level: Normal
Compression Method: Deflate
Dictoioany Size: 32k
Word Size: 32
Then start Zipping and push it to your sd card.
*Goto recovery
*install zip
*wipe data
Done!
wOaH?? It's easy?? Okay let's try the Hard part ^_^,
And now, Porting from Different SoCs.
(MT6582 To MT6572)
NOTE: Read and Follow the Instruction CAREFULLY!
Okay let's start, select your desired Custom Rom, put it in a folder and name it PORT, and also get your Stock Rom, put it in a folder and name it STOCK.
Now Replace this files from STOCK to PORT
*system/vendor
*system/usr
*system/lib/modules
*system/lib/hw
*system/lib/libncurses.so(nvm it if you don't have)
*system/etc/firmware
*system/etc/bluetooth
*system/etc/vold.fstab
*system/etc/vold.fstab.nand
*boot.img(you can also get it in your back up file from the CWM)
Now go to the folder of your STOCK and locate to system/build.prop and open it using notepad++, as well as in your PORT.
Find the line that contains this codes
This is from the STOCK one---
ro.mediatek.platform=MT6582
This is from the PORT one---
ro.mediatek.platform=MT6572
Replace that one from STOCK to PORT
It should look like this
ro.mediatek.platform=MT6582
*Then open the PORT and open ~META-INF/google/android/updater-script in your Notepad++
add this line according to their group
set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.mt65xx.so");
change the xx with your CPU, mine is MT6572
then It should look like this
set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.mt6572.so");
* Now Go back to the Rom folder and Take the boot.img and decompile it with any bootimg-unpack tool!
* Now delete the zimage and rename boot.img-ramdisk to PORT-Ramdisk
* Now Do the Same for Stock boot.imgand open the folder named PORT-ramdisk and copy all the fil PORT-[QUOTE]ramdisk to boot.img-ramdisk of your Stock boot.img
* Now Go to boot.img-ramdisk and open init.rc
* Now find these lines and replace withyour cpu
#Create Chip Property
on early_property:
ro.hardware=mt6582
setprop ro.mtk.hardware mt6589
on early_property:ro.hardware=mt6589
setprop ro.mtk.hardware mt6589
mine is mt6572,it should look like this
#Create Chip Property
on early_property:
ro.hardware=mt6582
setprop ro.mtk.hardware mt6572
on early_property:ro.hardware=mt6589
setprop ro.mtk.hardware mt6572
* Now Compile your New boot.img andPack your New ROM and Flash!!
Done!!
Porting Lewa OS5 ROM
* Replace These
|