[GUIDE][MEDIATEK] How To Port 5.x.x LP and 6.x.x MM Based ROMs for MTK Kitkat Devices

Search This thread

LowTension

Recognized Developer
Jan 27, 2014
326
689
Narnia
Xiaomi Mi 8
Xiaomi Poco F3
Fx7clax.jpg


How To Port Lollipop and Marshmallow Based ROMs for MTK Kitkat Devices

Only For Mediatek SOCs

This guide applies to same chipsets:

Example:
MT6592 to MT6592
MT6572 to MT6572
MT6582 to MT6582


And works also for different SOC with same GPU


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
- Your Stock KitKat ROM
- One Lollipop/Marshmallow ROM for port
- Brain :p



Step 1.- Unzip the Lollipop or Marsmallow ROM you want to port and also the Stock ROM. Rename the Lollipop/Marshmallow ROM folder to Port ROM



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



Code:
-[B][SIZE="2"]system/etc/firmware  <-- Folder
-system/usr/keylayout/Generic.kl  <-- File(if you  have issues with softkeys and power,volume keys after replacing this file, try don't touch the original [COLOR="Blue"]usr[/COLOR] folder in port ROM. [URL="https://forum.xda-developers.com/showpost.php?p=70381044&postcount=457"]See here[/URL][/SIZE][/B]

Step 3.-Open system/lib/hw folder in Stock ROM folder, then select & copy all files and paste to inside the 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, like this: audio.primary.mt65xx.so, audio_policy.mt65xx.so, gralloc.mt65xx.so, hwcomposer.mt65xx.so, ligths.mt65xx.so, sensors.mt65xx.so etc.



Step 4.-Rename your stock kitkat boot.img to stockboot.img and the boot.img from Port ROM folder to portboot.img. Now unpack the boot.imgs, use the kernel 3.4.67(zImage)from your decompiled stockboot.img and the ramdisk folder from decompiled portboot.img, recompile it and put this new boot.img in Port ROM folder. Read my post #144.





Step 5.- 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:
Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p[COLOR="Red"]5[/COLOR]", "0", "/system");
format("ext4", "EMMC", "/dev/block/mmcblk0p[COLOR="Red"]7[/COLOR]", "0", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p[COLOR="Red"]5[/COLOR]", "/system");



Step 6.- Zip the Port ROM folder and flash it in recovery mode and enjoy.:highfive:​

Press the "Thanks" button if this guide has been useful for you
 
Last edited:

LowTension

Recognized Developer
Jan 27, 2014
326
689
Narnia
Xiaomi Mi 8
Xiaomi Poco F3
Fixing Bugs

No audio in loudspeaker?

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

Storage Bug

Decompile the framework-res.apk, go to res/xm/storage_list.xml and edit it like the storage_list.xml from framework-res.apk of your Kitkat ROM, also edit the fstab.mt65xx in boot.img(compare with the fstab.mt65xx of your kitkat boot.img)

Sdcard not work or internal storage?

Replace:

system/bin/sdcard and system/bin/vold

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

For mt6572 replacing this:

system/lib/libimageio.so
system/lib/libcameradrv.so

coming soon more :p
 
Last edited:

kirito9

Inactive Recognized Contributor
Oct 30, 2013
3,127
1,366
I was waiting for a guide like this :). Ran out of thanks will thank you tomorrow :p
 

vampirefo

Senior Member
Apr 3, 2010
3,243
1,640
Sounds interesting, what about Lollipop to Lollipop? example My device already is Lollipop 5, port to 5.1 or CM 12.1
 
Last edited:

LowTension

Recognized Developer
Jan 27, 2014
326
689
Narnia
Xiaomi Mi 8
Xiaomi Poco F3
Can I with this instruction port from 5.0 to 6.0 for HelioX10 ?


You can't port a ROM from a phone with different processor, for example Android Marshmallow 6.0 from Nexus to Mediatek phone. This guide is only for porting ROMs from Mediatek to Meadiatek devices. About your Mediatek HelioX10 phone need another Mediatek HelioX10 phone running Android 6, the next mediatek Heliox10 running Android 6 will be the Elephone P9000
 

LowTension

Recognized Developer
Jan 27, 2014
326
689
Narnia
Xiaomi Mi 8
Xiaomi Poco F3
Sounds interesting, what about Lollipop to Lollipop? example My device already is Lollipop 5, port to 5.1 or CM 12.1
If you want to port the same version of Lollipop you need to delete and replace
-system/etc/firmware
-system/lib/egl
-system/lib/hw
-system/usr/keylayout/Generic.kl
-system/vendor

and also the port boot.img with your stock lollipop boot.img and make changes in mount points of the updater-script. For porting Lollipop 5.1.1 or CM12.1 to your device running lollipop 5.0, you need decompile your boot.img and the boot.img from lollipop 5.1.1. Use the zImage from your stock boot.img and the ramdisk from the boot.img of lollipop 5.1.1 or CM12.1 ROM and follow the steps 2, 3 and 4 of this guide(not forgetting to make changes in mount points of the updater-script)
 
Last edited:

PraneethMv

Senior Member
May 30, 2015
476
122
22
Hyderabad
iQOO 7 Legend
Bro, can i use this method to port rom from MT6752 to MT6589? For the kitkat stock rom i'm using CM11(mt6589) and for lollipop can i use stock rom of lenovo k3 note(mt6752)?
 
Last edited:

kirankp

Senior Member
Apr 1, 2015
71
15
Hi,
Can you provide the guide for porting lollipop rom to snapdragon kitkat devices? :)
 

vickdu31

Senior Member
May 5, 2012
316
107
Thanks a lot for this :) Now the big question. Where do we find stable CM12.1 for MTK devices !! ?

You can't port a ROM from a phone with different processor, for example Android Marshmallow 6.0 from Nexus to Mediatek phone. This guide is only for porting ROMs from Mediatek to Meadiatek devices. About your Mediatek HelioX10 phone need another Mediatek HelioX10 phone running Android 6, the next mediatek Heliox10 running Android 6 will be the Elephone P9000

And what about Sprout ? (Android One) I see for example CM12.1 for WIko rainbow using sprout files. Any chances for 6.0 ?
 
Last edited:

MaxisMan

Senior Member
Dec 9, 2014
610
254
Awesome guide!

Currently porting Android 5.0 (mt6582). Hope it works! :fingers-crossed:

EDIT: Didn't work, :( stuck at boot logo.
 
Last edited:

neodarklink

Senior Member
Jan 10, 2012
57
16
Salta
Very useful guide, thanks so much, this will be aplicable for porting a ROM from Smartphone to tablet or do I need to find an Rom from tablet to tablet (obviously talking about MTK devices) I am very interested to have Lillipop in my Lenovo a10-70 (a7600-f), SoC MT8121, with 4.4.2 :'(

I have read that:

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

Thanks and sorry for my bad english
 

vampirefo

Senior Member
Apr 3, 2010
3,243
1,640
Thanks a lot for this :) Now the big question. Where do we find stable CM12.1 for MTK devices !! ?



And what about Sprout ? (Android One) I see for example CM12.1 for WIko rainbow using sprout files. Any chances for 6.0 ?
I don't know how stable it is, but blue studio energy has one, its mtk6582 I have a blu energy X plus, also mtk6582, stock lollipop.

Sent from my BLU ENERGY X PLUS using Tapatalk
 
  • Like
Reactions: LowTension

sagar.singh

Senior Member
Sep 25, 2013
514
210
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

coming soon more :p

Bro can u tell me complete guide for fixing storage bug its not clear from this guide storage is shown as emulated storage and only shows 3gb
 

Attachments

  • Screenshot_2015-10-13-19-05-38.png
    Screenshot_2015-10-13-19-05-38.png
    65.8 KB · Views: 1,990

LowTension

Recognized Developer
Jan 27, 2014
326
689
Narnia
Xiaomi Mi 8
Xiaomi Poco F3
Bro can u tell me complete guide for fixing storage bug its not clear from this guide storage is shown as emulated storage and only shows 3gb

Decompile the framework-res.apk, go to res/xm/storage_list.xml and edit it like the storage_list.xml from framework-res.apk of your Kitkat ROM, also edit the fstab.mt65xx in boot.img(compare with the fstab.mt65xx of your kitkat boot.img)
 
  • Like
Reactions: MaxisMan

LowTension

Recognized Developer
Jan 27, 2014
326
689
Narnia
Xiaomi Mi 8
Xiaomi Poco F3
  • Like
Reactions: kirito9

Top Liked Posts

  • There are no posts matching your filters.
  • 136
    Fx7clax.jpg


    How To Port Lollipop and Marshmallow Based ROMs for MTK Kitkat Devices

    Only For Mediatek SOCs

    This guide applies to same chipsets:

    Example:
    MT6592 to MT6592
    MT6572 to MT6572
    MT6582 to MT6582


    And works also for different SOC with same GPU


    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
    - Your Stock KitKat ROM
    - One Lollipop/Marshmallow ROM for port
    - Brain :p



    Step 1.- Unzip the Lollipop or Marsmallow ROM you want to port and also the Stock ROM. Rename the Lollipop/Marshmallow ROM folder to Port ROM



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



    Code:
    -[B][SIZE="2"]system/etc/firmware  <-- Folder
    -system/usr/keylayout/Generic.kl  <-- File(if you  have issues with softkeys and power,volume keys after replacing this file, try don't touch the original [COLOR="Blue"]usr[/COLOR] folder in port ROM. [URL="https://forum.xda-developers.com/showpost.php?p=70381044&postcount=457"]See here[/URL][/SIZE][/B]

    Step 3.-Open system/lib/hw folder in Stock ROM folder, then select & copy all files and paste to inside the 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, like this: audio.primary.mt65xx.so, audio_policy.mt65xx.so, gralloc.mt65xx.so, hwcomposer.mt65xx.so, ligths.mt65xx.so, sensors.mt65xx.so etc.



    Step 4.-Rename your stock kitkat boot.img to stockboot.img and the boot.img from Port ROM folder to portboot.img. Now unpack the boot.imgs, use the kernel 3.4.67(zImage)from your decompiled stockboot.img and the ramdisk folder from decompiled portboot.img, recompile it and put this new boot.img in Port ROM folder. Read my post #144.





    Step 5.- 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:
    Code:
    format("ext4", "EMMC", "/dev/block/mmcblk0p[COLOR="Red"]5[/COLOR]", "0", "/system");
    format("ext4", "EMMC", "/dev/block/mmcblk0p[COLOR="Red"]7[/COLOR]", "0", "/data");
    mount("ext4", "EMMC", "/dev/block/mmcblk0p[COLOR="Red"]5[/COLOR]", "/system");



    Step 6.- Zip the Port ROM folder and flash it in recovery mode and enjoy.:highfive:​

    Press the "Thanks" button if this guide has been useful for you
    65
    Fixing Bugs

    No audio in loudspeaker?

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

    Storage Bug

    Decompile the framework-res.apk, go to res/xm/storage_list.xml and edit it like the storage_list.xml from framework-res.apk of your Kitkat ROM, also edit the fstab.mt65xx in boot.img(compare with the fstab.mt65xx of your kitkat boot.img)

    Sdcard not work or internal storage?

    Replace:

    system/bin/sdcard and system/bin/vold

    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

    For mt6572 replacing this:

    system/lib/libimageio.so
    system/lib/libcameradrv.so

    coming soon more :p
    7
    2 tools you give me cannot unpack boot. the tool which i had used is ok but stuck on logo screen if i change kernel and edit fstab. if i use stock boot, my device bootloop.
    what can i do?

    Use Carliv Kitchen Image or Michfood's tool

    1
    In michfood's tool, put the stockboot.img and portboot.img. Drag and drop the mtk boot.img to unpack...
    iF2fU0D.png


    Open in two side by side windows the stockboot folder and portboot folder, then select kernel and kernel_header from stockboot folder and drag them over the portboot folder kernel and kernel_header replacing both.
    r6w3dsB.png


    Drag and drop portboot folder to MTK_Pack and put the new boot.img to portrom folder.
    2Aimdyl.png


    2
    In carliv's tool, put the stockbot.img and portboot.img to boot-resources folder
    CoLwy8t.png


    Now, execute this tool and unpack the stockboot.img fist and portboot.img after...
    vwR0c8m.png
    jV2Uy5F.png


    Then, open the stockport folder and portboot folder in two windows...
    pwktFVn.png


    Delete all files inside portrom folder except ramdisk folder
    eVqPOJm.png


    Then copy all files except the ramdisk folder from stockboot folder and paste to inside the portboot folder
    AyWCx1I.png


    Now, repack the portboot folder and put the new boot.img from output folder to portrom folder(rename to boot)
    YYUWeMC.png
    Msj2rWw.png
    5
    @Gravemind2015
    I believe that someone has ported successfully with MT6592
    5
    Sounds interesting, what about Lollipop to Lollipop? example My device already is Lollipop 5, port to 5.1 or CM 12.1
    If you want to port the same version of Lollipop you need to delete and replace
    -system/etc/firmware
    -system/lib/egl
    -system/lib/hw
    -system/usr/keylayout/Generic.kl
    -system/vendor

    and also the port boot.img with your stock lollipop boot.img and make changes in mount points of the updater-script. For porting Lollipop 5.1.1 or CM12.1 to your device running lollipop 5.0, you need decompile your boot.img and the boot.img from lollipop 5.1.1. Use the zImage from your stock boot.img and the ramdisk from the boot.img of lollipop 5.1.1 or CM12.1 ROM and follow the steps 2, 3 and 4 of this guide(not forgetting to make changes in mount points of the updater-script)