How To Port Lollipop/Marshmallow [5.x.x][6.0.0] CyanogenMod 12.1/13 Based ROMs for MTK 65xx Devices
· Only For Mediatek SOCs
This guide applies to same chipsets:
Example:
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:
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
i try many porting method hope this will work on my device mtk6592 chipset flash cm base rom but stucked on bootanimation logo
ReplyDeleteThis method works 100%. I have personally tried and successfully ported many roms.
DeleteJust make sure you port boot.img correctly. And only replace files mentioned in guide. Then try to fix bugs after rom boots successfully.
please witch android version of the stock (base) rom whene i port custom rom CM13 to MT6582...
ReplyDeleteHi 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
ReplyDeletewitch 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.
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.
Deletehi 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
ReplyDeleteI am sorry but this guide is only for mediatek chipsets.
DeleteFor Qualcomm Snapdragon you can check This Guide. But i never tried it so i don't know it works perfectly or not.
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.
ReplyDeleteCheck your mountpoints in updater script. And edit boot.img properly.
DeleteKindly assist. I need one that works on mt6592 JB 4.2.2 kernel version
ReplyDeleteHello Sir,
ReplyDeleteI 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.
Yes if the rom boots with that kernel you can use it.
DeleteBro My kernal Version 3.10.54 Android version 5.0.2
ReplyDeleteCan I port this
What's the guide?
Please Reply Bro ?
Same method. You just need a rom that have same kernel version.
Deletenice and helpful post bro
ReplyDeletepliz bro I need Marshmallow rom
ReplyDeletekernal Version 3.10.54 Android version 5.0.2
pliz help me bro
You did not mentioned your chipset.
DeleteI am using cm13 on mt6582 , it never connects to vpn .
ReplyDeleteI have used many vpn apps but none worked for me. Plz get me the solution
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.
DeleteHow to fix wifi in cm13? Can you help me?
ReplyDeleteReplace
Deletesystem\etc\firmware
Bro I have chipset mt6735 lollipop 5.1 with kernel 3.10.65
ReplyDeleteI 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
Which files.?
Deleteall impotent flies should be present if its not just skip it.
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?
ReplyDeleteueventd.rc is in "boot.img"
DeleteHow To Port boot.img And Port Kernel- Unpack/Repack
bro.... how can I port mt6735 64bit. my kernel 3.10.65..... plz help me.. lolipop 5.0.1 now using
ReplyDeleteHow To Port Custom Rom's For 64bit MTK Chipset
DeleteBro 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
ReplyDeleteopen the rom zip and check if the mentioned folder and updater-binary present in there.
Deleteand 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.
Pls say about mtk6589 kernal 3.4.5
ReplyDeleteWell 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.
DeleteYou 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.
Hey dude!! I have CM 12.1 kernel 3.10.72.Is it possible to port CM 13 with base ROM 12.1???
ReplyDeleteYes it is possible, just find a cm13 rom with same kernel version and chipset.
Deletesir cant you provide simple copy paste method instead of android kitchen or any other..... it will be more easier to understand
ReplyDeleteyou need android kitchen just to port boot.img, else you can just copy-paste other files.
Deleteif 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.
Can you tell me a way to port nougat to unite 2 or mt6582 chipsets
ReplyDeleteis that okay if i put all kernel to port img ?
ReplyDeleteSorry i did not understood what you want to say.
DeleteYou want to use same kernel(boot.img) in all your port roms?
Or is it something else?
Hi Mr Alex, you are doing a great job, keep it up.
ReplyDeleteI 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.
Does FM radio works in your stock rom?
DeleteFirst 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)
Thanks for the reply.
ReplyDeleteMy 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.
can you port me lollipop rom for thl t100s mtk6592 with kernel 4.4.3? is it possible? thanks
ReplyDeletePorting 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.
Deletehey 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
ReplyDeleteYes you can. Just find a rom with same chipset and kernel version.
DeletePS. I am not sure about nougat but it will surely work for MM.
DeleteI 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?
ReplyDeleteYes you can port it as long as the port rom have same chipset and same kernel version.
DeleteI 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!!!
ReplyDeleteThere 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.
DeleteThe mount points on the ported rom are writte :format("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "0", "/system");
ReplyDeletemount("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "/system"); only these are written please help
open both roms updater.scripts and compare lines that contains "/dev/block/mmcblk0pxxx"
DeleteWhere 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!
ReplyDeleteIf you are having trouble finding mount points or dont have stock updater.script then try this tutorial.
DeleteHow To Find Android System Mount Points
find the mountpoints and change them accordingly in port rom's updater.script.
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
ReplyDeletePlease share port roms updater-script.
DeleteI 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.
ReplyDeleteThen you have downloaded the wrong zip.
DeleteWill this guide work for flyme os6?
ReplyDeleteIt will work but you might face some bugs.
DeleteCan I upgrade my tablet mt6582 with 3.4.67 kernel from Android KitKat to Android Lollipop?
ReplyDeleteCan I upgrade my tablet mt6582 with 3.4.67 kernel from Android KitKat to Android Lollipop?
ReplyDelete