[GUIDE] [MEDIATEK] HOW TO PORT 5.X.X LOLLIPOP BASED ROMS FOR MTK KITKAT DEVICES


How To Port Lollipop Based ROMs for MTK Kitkat Devices

Only For Mediatek SOCs
This guide applies to same chipsets:

Example:
MT6577 to MT6577
MT6589 to MT6589
MT6572 to MT6572
MT6582 to MT6582


And works also for:
MT6589 to MT6577
MT6582 to MT6572
MT6577 to MT6575


Before starting this tutorial, please make a backup of your ROM
I am not responsible for any damage to your device, this guide is for expert users.


You Need:

- Winrar, 7-Zip or similar
Notepad++
- Tool for unpack/repack mtk boot.imgs 
- Kitkat Stock ROM
- Lollipop ROM for port
- Brain 



Step 1.- Unzip the port lollipop ROM and also stock ROM. Rename the lollipop ROM to port ROM



Step 2.- Delete this files or folders in port ROM and replace with your files from Stock ROM:


system/etc/firmware
system/lib/egl
- system/usr/keylayout/Generic.kl

Step 3.- Open system/lib/hw folder in Stock Rom, then select & copy all files and paste to system/lib/hw folder in port ROM replacing files.
Note: if you porting a ROM from a different SOC, delete this files before in port rom: audio.primary.mt65xx.so, gralloc.mt65xx.so, hwcomposer.mt65xx.so, ligths.mt65xx.so, sensors.mt65xx.so




Step 4.- Open system/vendor in Stock ROM, copy folders and sub folders and paste to system/vendor in port ROM replacing files


Step 5.-.Rename the stock boot.img to stock boot.img and the port boot.img to port boot.img. Unpack theboot.imgs, compare the fstabs(ramdisk/fstab or fstab.mt65xx) and make changes in fstab from port boot.img(open it using notepad++). Use zImage from your stockboot.img and the ramdisk folder from port boot.img, recompile and replace in port rom folder.




Step 6.- Open the updater-script in META-INF from port rom, open it with Netepad++. Edit the format &mount points(compare with your updater-script from stock META-INF)

Example: 
format("ext4", "EMMC", "/dev/block/mmcblk0p7", "0", "/system");
format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/system");


Step 7.- Zip the port ROM and flash it in recovery mode and enjoy.

Fixing Bugs

No audio in loudspeaker?

Replace libaudio.primary.default.so from stock ROM to Port

Storage Bug

Edit the storage.xml in framework-res.apk and set sdcard1 as primary and edit the fstab.mt65xx.rc and init.mt65xx.rc in the ramdisk from port boot.img.

Bluetooth

Replace libbluetooth_mtk.so and libbluetoothem_mtk.so from stock ROM to port.

Sensors

Replace libsensors.so file from stock ROM to port.

Wifi

Replace libwifi-service.so from stock ROM to port


Camera

all files that start with libcam....so


Credit:
ZonaRMR
Share this article :

+ comments + 2 comments

Post a Comment

 
Copyright © 2014. xdabd - All Rights Reserved
Template Created by হোছাইন আহম্মদ