How To Port Lollipop/Marshmallow [5.x.x][6.0.0] CyanogenMod 12.1/13 Based ROMs for MTK 65xx Devices

01:52 Alex 62 Comments

·         Only For Mediatek SOCs

This guide applies to same chipsets:
Example:
  • MT6577 to MT6577
  • 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.

Here is a step by step guide to install Cyanogenmod 12.1 based Custom ROMs on your MT6582 or MT6592 device running Android Kitkat 4.4.x

Note: - This guide is only for experienced porters, and for people who have experience with using Android Kitchen.
Things you need:
1.    A real Lollipop based Custom ROM with kernel 3.4.67.
Note: - If your stock rom have kernel  3.10.xx then use same kernel version rom. You cant port from different version]

2.    Have Android Kitchen and Cygwin Setup properly.

3.    View this artical to setup Android Kitchen and Cygwin Setup properly.
Setup Android Kitchen and Cygwin in Windows xp/7/8/8.1/10
4.    Experience of using Android Kitchen properly.
5.    Never close kitchen during the process until you get the final result.

How to :
01. Download any of the ROM which you want to port and then place it in original_update.
02. Setup a working folder.
03. After setting it up, Type 0 = ADVANCE OPTIONS.
04. Type 12 = Tools for boot image <unpack/re-pack/etc.>.
05. Type w = Extract kernel +ramdisk from boot.img.
06. After unpacking is completed you will get a new folder called “BOOT-EXTRACTED” in kitchen folder.
07. In Android Kitchen, Type a = Extract kernel +ramdisk from boot.img/recovery.img in any other folder.
08. A new folder called “bootimg_xxxxxxxxxx” will be created inside the “Kitchen folder”.
09. Copy and paste your stock rom’s  boot.img inside the newly created “bootimg_xxxxxx_xxxxxx” folder.
10. After unpacking is completed, you will get two folders:
a. BOOT-EXTRACTED - Unpacked boot.img of the CM ROM you downloaded.
b. bootimg_xxxxxx_xxxxxx - Unpacked boot.img of Stock ROM.
11. Open bootimg_xxxxxx_xxxxxx folder and you will find "zImage" copy it.
12. Open BOOT-EXTRACTED folder and delete "zImage" and paste the stock "zImage".
Note: - Don’t delete or modify any file in “boot.img-ramdisk” folder.
Note: - For CyanogenMod 13 replace ueventd.rc also.
13. Now back to Android Kitchen, Type b = Build boot.img from BOOT-EXTRACTED <for working folder>.
14. After repacking is complete go to the Working folder that you created earlier.
15. There you will find boot.img, that boot.img is the newly ported boot.img
You can close the kitchen if you haven’t yet.
16. Now unzip the CM ROM you downloaded.
17. Copy the newly ported boot.img and paste it in the CM ROM you downloaded,                        replacing the boot.img that was already there. 

Phew! We have done the most complex part of our guide. Only some copy and pasting remain. From step 1 to 17 all is same for porting both CyanogenMod 12.1 Lollipop and Cyanogenmod 13 Marshmallow[See step d. below in CM 13 Section]. After it follow as mention below.

For Porting CyanogenMod 12.1 Lollipop
After step 17 now find and replace : [From Stock To Port]
  • a. hwcomposer.mt65xx.so  <--- File
  • b. libmali.so  <--- File
  • c. -system/etc/firmware   <-- Folder
  • d. -system/lib/modules*  <--- Folder
  • e. -system/usr/keylayout/Generic.kl   <--- File
  • f. 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 and replace files don’t delete.
Note: - if you porting a ROM from a different SOC [6582 to 6592], delete these 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.
After doing this go to step 18. 

For Porting CyanogenMod 13 Marshmallow
After step 17 now find and replace :[From Stock To Port]
a. In system/lib/:
  • - libMali.so
  • - hwcomposer.mt6582.so
  • - libaudio.primary.default.so
  • - libcameracustom.so
  • - libcamalgo.so
  • - libcamdrv.so
b. In system/bin/:
  • - gsm* (all files with the name gsm)
  • - rild (replace rild from working cm12.1)
c. In system/etc/:
- bluetooth, firmware, wifi (replace entire folder)
d. In boot.img:
  • - kernel/zimage
  • - ueventd.rc
Finally At the end:
18. 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)
format("ext4", "EMMC", "/dev/block/mmcblk0p7", "0", "/system");
format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/system");

20. ZIP the ROM and use Latest PhilZ or TWRP recovery to flash the ROM.

If you face any bugs after porting the rom please follow the guide.
How to fix bugs when porting lollipop, cyanogenmod based roms

62 comments:

  1. i try many porting method hope this will work on my device mtk6592 chipset flash cm base rom but stucked on bootanimation logo

    ReplyDelete
    Replies
    1. This method works 100%. I have personally tried and successfully ported many roms.
      Just make sure you port boot.img correctly. And only replace files mentioned in guide. Then try to fix bugs after rom boots successfully.

      Delete
  2. please witch android version of the stock (base) rom whene i port custom rom CM13 to MT6582...

    ReplyDelete
  3. Hi brother , i want to port a custom rom : kernel 3.4.67-CM13-V6.0.1 to my device kernel 3.4.67 chipset mt6582
    witch stock i must use (i mean version android of the stock), the stock rom must be kitkat or lollipop or what please help me...
    and thank you.

    ReplyDelete
    Replies
    1. If your device have any lollipop/CM12[ported] rom, i recommend to use that as a base because it will give best results and will be more stable. but if you only have kitkat stock rom as base. you can use it but after porting you might face some issues.

      Delete
  4. hi i ported cm 13 to my device and use cm 12 as a base rom my chipset is snap dragon i did not find any of files to copy what is the wrong

    ReplyDelete
    Replies
    1. I am sorry but this guide is only for mediatek chipsets.
      For Qualcomm Snapdragon you can check This Guide. But i never tried it so i don't know it works perfectly or not.

      Delete
  5. Please whenever I flash either lollipop base rom or marshmallow based ROM on my mt6582 phone running Android 4.4 (i.e kitkat) it will flash successfully. But it wouldn't boot, it will stop at either boot logo or after bootlogo it will just showing blank screen without passing that stage and I follow all the porting guide from A-Z without ommiting any step. But if I flash any 4.4 base ROM it will flash successfully also and it will boot normal. Please I need your response quickly.

    ReplyDelete
    Replies
    1. Check your mountpoints in updater script. And edit boot.img properly.

      Delete
  6. Kindly assist. I need one that works on mt6592 JB 4.2.2 kernel version

    ReplyDelete
  7. Hello Sir,
    I have a device with Kernel 3.4.5, MT6582m chipset (Lenovo A680 ROW) with Jellybean 4.2.2 installed. I have been searching for a kitkat or lollipop ROM for my device and so far I got that I need kernel 3.4.67 for these ROMs. But I found a lollipop (5.1.1) ROM for my device and flashed it, ran successfully, but it was buggy. Now, can you please tell me, is it possible to port any other lollipop 5.1.1 based ROM with the help of that one? I mean is it possible to use the Kernel from it? - Eagerly waiting for your answer sir...Thank You.

    ReplyDelete
    Replies
    1. Yes if the rom boots with that kernel you can use it.

      Delete
  8. Bro My kernal Version 3.10.54 Android version 5.0.2
    Can I port this
    What's the guide?
    Please Reply Bro ?

    ReplyDelete
    Replies
    1. Same method. You just need a rom that have same kernel version.

      Delete
  9. pliz bro I need Marshmallow rom
    kernal Version 3.10.54 Android version 5.0.2
    pliz help me bro

    ReplyDelete
  10. I am using cm13 on mt6582 , it never connects to vpn .
    I have used many vpn apps but none worked for me. Plz get me the solution

    ReplyDelete
    Replies
    1. This is a source bug. Try a newer build. And ask the developer if the vpn works in his rom. because there are very few roms available which supports vpn.

      Delete
  11. How to fix wifi in cm13? Can you help me?

    ReplyDelete
  12. Bro I have chipset mt6735 lollipop 5.1 with kernel 3.10.65
    I already using bliss pop 5.1 base ROM but I want complete marshmallow ROM I tried your method but some of the files are you listed that is not present in my device is there any other way to use cm13

    ReplyDelete
    Replies
    1. Which files.?
      all impotent flies should be present if its not just skip it.

      Delete
  13. How do i replace ueventd.cr , I am trying to port CM13 from AOSP 5.0.2, the only available rom for my device but how do I extract ueventd.cr from it?

    ReplyDelete
  14. bro.... how can I port mt6735 64bit. my kernel 3.10.65..... plz help me.. lolipop 5.0.1 now using

    ReplyDelete
  15. Bro i ported resurrection remix for my htc desire 820g plus dual sim mtk6592 and the resurrection remix that i port is also mtk6592. When i flashed the rom i got this error "could not find 'META-INF/com/google/android/update-binary' error installing zip file " help me bro how to fix this error

    ReplyDelete
    Replies
    1. open the rom zip and check if the mentioned folder and updater-binary present in there.

      and make sure you have zipped the rom correctly. select files like system(folder), META-INF and boot.img (and other if there are any) and not the folder in which these files are stored.

      use updater-binary from port rom not from base rom.

      Delete
  16. Pls say about mtk6589 kernal 3.4.5

    ReplyDelete
    Replies
    1. Well it is quite an old kernel and i am assuming that you are still on jellybean, in that case these method of porting will not work. And updating kernel is a bit hard task.
      You will have to find a custom which uses exact kernel version (kernel-3.4.5, JB 4.2.x or 4.4.2) and try to port that.
      As i dont have much experience in jellybean i'll advice you to head over to XDA, there are already some good guides for porting jellybean roms.

      Delete
  17. Hey dude!! I have CM 12.1 kernel 3.10.72.Is it possible to port CM 13 with base ROM 12.1???

    ReplyDelete
    Replies
    1. Yes it is possible, just find a cm13 rom with same kernel version and chipset.

      Delete
  18. sir cant you provide simple copy paste method instead of android kitchen or any other..... it will be more easier to understand

    ReplyDelete
    Replies
    1. you need android kitchen just to port boot.img, else you can just copy-paste other files.
      if you have any difficulty in using kitchen then you can use boot.img from a custom rom which was already ported for you device [Same android version with same base i.e. cm12.1(lollipop) or cm13(marshmallow), same kernel version (3.4.xx-3.10.xx)]
      just port a new rom and instead of porting boot.img use the boot.img from the working custom cm12/13 rom for your device.

      otherwise, if you dont have any custom rom with same base. you will have to port boot.img there is no other shortcut for it.

      you can check other guides to know how you can port roms/boot.img on your mobile without any need of pc.

      Delete
  19. Can you tell me a way to port nougat to unite 2 or mt6582 chipsets

    ReplyDelete
  20. is that okay if i put all kernel to port img ?

    ReplyDelete
    Replies
    1. Sorry i did not understood what you want to say.
      You want to use same kernel(boot.img) in all your port roms?
      Or is it something else?

      Delete
  21. Hi Mr Alex, you are doing a great job, keep it up.

    I have a little problem. I ported a lineage rom 13 on my mtk6582 with kernel 3.4.67.

    Everything works well, but the fm radio crashes. The rom has an fm app, so what do you think could have gone wrong?

    Thanks, awaiting your reply.

    ReplyDelete
    Replies
    1. Does FM radio works in your stock rom?
      First make sure that the rom you are porting is bugless and FM is working fine in that.

      Second If you are sure that FM works in your stock rom and port rom both. Then replace these files from stock rom.

      \system\app\FmRadio***\FmRadio***.apk
      \system\lib\libfmcust.so
      \system\lib\libfmjni.so
      \system\priv-app\FMRadio(folder)


      or any other file related to fm you can find in system folder.

      Third there are some fix provided by different devs, if you willing to try in case above method dint work.
      1.FM Fix 1 (flashable zip)

      2.FM Fix 2 (Don't Flash Manually place the contents in /system)

      Delete
  22. Thanks for the reply.

    My stock rom has fm, but for sometime now, most roms I port don't have fm.
    However, when I saw lineage OS, with fm apk, I said let me try it.

    So, I can't really say for sure, if the fm is actually working on the lineage OS. The developer states that, it works.

    But then, I will just follow your tips. Thanks again, I appreciate.

    ReplyDelete
  23. can you port me lollipop rom for thl t100s mtk6592 with kernel 4.4.3? is it possible? thanks

    ReplyDelete
    Replies
    1. Porting roms for each device specific is not possible for me. But you can port roms for your device all porting guides are available on the blog.

      Delete
  24. hey i have micromax q380 a mtk6582 with kernel 3.10.54 so can i port a marshmallow or nougat based rom to lollipop based rom? IF yes can you suggest any

    ReplyDelete
    Replies
    1. Yes you can. Just find a rom with same chipset and kernel version.

      Delete
    2. PS. I am not sure about nougat but it will surely work for MM.

      Delete
  25. I have a very serious problem here, i have a MT6572 Soc with 3.10.72 kernel runing stock and real lollipop (that is really weird, because as i know the common kernel for this device is 3.4.xx) and i want to know... can i port cm13 from another MT65xx Soc runing the same kernel?

    ReplyDelete
    Replies
    1. Yes you can port it as long as the port rom have same chipset and same kernel version.

      Delete
  26. I have ported cm12.1 mtk 6580 kernal version 3.10.72 but it does'nt boots up it just shows the boot logo and then restarts everytime please help me!!!

    ReplyDelete
    Replies
    1. There are two possible reasons for the bootloop. Either there is something wront with the boot.img or the storage mount points are not correct. So i suggest to port the boot.img again properly and fix the storage.

      Delete
  27. The mount points on the ported rom are writte :format("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "0", "/system");
    mount("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "/system"); only these are written please help

    ReplyDelete
    Replies
    1. open both roms updater.scripts and compare lines that contains "/dev/block/mmcblk0pxxx"

      Delete
  28. Where to get update.scripts of stock room because it is in sp tool flashable stock rom and I have extracted system img from it and I have get mount points from my Droid tools please help!

    ReplyDelete
    Replies
    1. If you are having trouble finding mount points or dont have stock updater.script then try this tutorial.
      How To Find Android System Mount Points

      find the mountpoints and change them accordingly in port rom's updater.script.

      Delete
  29. The rom link is :https://abrhambebh.blogspot.com/2016/09/stablerom511cyanogenmod-121-511-for.html (and the mount poitfrom mtk droid tool are:https://drive.google.com/file/d/0B_gT5szJ36McRkZiSllWNnE0NjA/view?usp=sharing

    ReplyDelete
  30. I can not replace any file in port rom system folder because i can only find build.prop file there, no folder or any other files.

    ReplyDelete
    Replies
    1. Then you have downloaded the wrong zip.

      Delete
  31. Will this guide work for flyme os6?

    ReplyDelete
    Replies
    1. It will work but you might face some bugs.

      Delete
  32. Can I upgrade my tablet mt6582 with 3.4.67 kernel from Android KitKat to Android Lollipop?

    ReplyDelete
  33. Can I upgrade my tablet mt6582 with 3.4.67 kernel from Android KitKat to Android Lollipop?

    ReplyDelete

Disable_Adblock

We know Ads suck, but at IrisBuddies we will not let them do that
As blocking is a good idea to get rid of stupid “Download Now” Buttons around the web
That’s not in our case. We think you won't find Ads on Our site terrible or annoying
Support us by Whitelisting “IrisBuddies” on your Adblocking Plugin or By disabling your AdBlocking software

If you think this is not good and we should allow AdBlocking Plugins
then Please Contact Us or write us on our Facebook Page
and we might allow it in near future.