MTK Porting Guide For Kitkat ROMs

MT65xx Porting Guide


UPDATE : Video on MTK Porting guide has been uploaded!!! Full HD 1080P resolution. Please subscribe to my channel and don't forget to press the Thumb's up button. This will encourage me to make more video guides
The video can be found here :


Do this at your own risk. I or my website will not be responsilbe for any damage to you or your device
Port 4.4.2 and 4.4 ROMs using this guide
I will not be responsible for any damage to your device.

This guide is only for porting ROM of the same chipset. You can port any ROM which is made for your chipset.

MT6572 to MT6572
MT6582 to MT6582
MT6592 to MT6592
MT6577 to MT6577
MT6589 to MT6589

This guide can only be used to port ROMs for the same android version.

4.4.2 to 4.4.2
4.4 to 4.4

GUIDE :
Replace folders from Port To Stock

1. /system/app
2. /system/framework
3. /system/fonts
4. /system/media
5. /system/priv-app
6. /system/build.prop
7. /META-INF
8. Copy any extra files in the Port ROM

Copy files from Port to Stock :

1. Copy any extra file in /system/bin
2. Copy all files except platform.xml and handheld_core_hardware.xml from /system/etc/permissions
3. Copy all files from /system/lib/ not folders and paste them in Stock ROM /system/lib/ skip any existing file do not replace

Last Step :
This step is important because sometimes the device gets stuck in boot logo because the /system partition is not mounted properly1. Open Port ROM /META-INF/com/google/android/updater-script using Notepad++


2. Open MTK Droid Tools and connect your device
3. Select Blocks Map
4. Now in updater-script find a line that resembles this (Note it will not be the same)

format("ext4", "EMMC", "/data", "0");
format("ext4", "EMMC", "/system", "0");
mount("ext4", "EMMC", "/dev/block/mmcblk0p4", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p6", "/data");

5. In the Blocks Map you opened before find these :



6. Now just change the mount points accordingly

Example : 

*Note : Your updater-script and my updater-script will not be the same 
My Port ROM updater-script has these lines :

"format("ext4", "EMMC", "/cache", "0");
format("ext4", "EMMC", "/system", "0");" (These lines do not have any mount points you do not need to do anything)
"mount("ext4", "EMMC", "/dev/block/mmcblk0p8", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p10", "/data");" (The red colored numbers are the mount points)

My Blocks Map shows that /system is mounted in 5 and /data is mounted in 7 so I will edit it like this :

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

BUG FIXING :

To fix stuck on boot animation after flashing MIUI ROM :
Port the kernel using this guide : Port Kernel
To fix bootloop :
Replace files from Stock to Port
1. libandroid_runtime.so
2. libandroid_servers.so
3. libmedia_jni.so

To fix black screen, Or messed up boot screen :
Replace files from Stock to Port
1. /system/lib/libMali.so

To fix memory issues :
Replace files from Stock to Port
1. /system/bin/vold

To fix audio :
Replace files from Stock to Port
1. /system/lib/libaudio.primary.default.so

NOW ZIP AND FLASH 

133 comments:

  1. I tried porting the HiveUI Rom for mt6592 device to my mt6592 device.The rom works like charm but the major problem is that the internal storage is showing 0KB.I tried accessing my internal storage via pc but it showed up 0KB and no disk is available error.Please help me sir.

    ReplyDelete
    Replies
    1. replace /system/bin/vold from stock to port

      Delete
    2. now i am getting a "symlink failed" error.Please help.

      Delete
    3. did you do something in the updater-script ?

      Delete
  2. Replies
    1. nope, you have done something, you are not supposed to get symlink error unless you do something to the updater-script

      Delete
    2. OK..will try porting ROM again.

      Delete
    3. BTW I tried porting lollipop for mt6592 to my device by your tutorial.Flashing was successful but when my phone boots up...it gets stuck at bootloader.

      Delete
    4. no ROM can make you boot into bootloader mode without you selecting for that option, and please read before you comment i no longer support that ROM

      Delete
    5. Decompile framework-res and set default storage sd1

      Delete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Thanks bro, but the problems I encountered in hive ui are as follows
    Internal memory does not exist
    Sim 1 has serious network difficulty
    Lags a lot even in settings app and launcher
    Can't remember the rest, had to revert back...I'm using infinix hot note mt6592,octacore,1gb ram,kitkat
    But the ROM is beautiful overall....Thanks bro for a fix

    ReplyDelete
    Replies
    1. it is built for a 2GB device so it will lag, you have to port using my new porting guide to fix bugs

      Delete
  5. Do you mean porting the kernel ?

    ReplyDelete
    Replies
    1. did you port the hive ui ROM using this guide ?

      Delete
  6. I tried the whole porting guide now and I got an error on fixing permissions which resulted in bootloop.... Previously I replaced only system/bin/vold and the lib files for fixing bugs only.

    ReplyDelete
    Replies
    1. just tell me did you follow this guide or not ?
      just try to replace boot.img in the ROM with your stock boot.img and flash and change mount points

      Delete
  7. I tried it my stock boot.img only now and my issues are WiFi,Bluetooth, sim 1 network issues and I realized that my CPU used only one core that's why it was lagging... Any help please

    ReplyDelete
    Replies
    1. replace /system/etc/bluetooth, wifi, security firmware from stock to port and reflash

      Delete
  8. Just did that now, WiFi, Bluetooth and network fixed...remains the lagging primarily

    ReplyDelete
    Replies
    1. flash the PurePerformance tweak it is in this website

      Delete
  9. Hey yo , in the step 7 of this port guide it states that you have to copy /META-INF from Port To Stock , but at the end you also said that you have to open updater-script in /META-INF from Port and change the values to the values that shows the Stock , so it would be better to change the order of the steps and change the values first in the updater-script in /META-INF from Port and then copy the folder /META-INF from Port To Stock?

    ReplyDelete
    Replies
    1. i stated that you have to take stock mount values from MTK droid tools, i did not say that we have to take vlaues from stock META-INF

      Delete
    2. it is the same thing dude, change values and paste to stock ROM or paste to stock rom and then change values

      Delete
    3. Ok, now the values point is clear to me

      Delete
  10. Also ,by the instructions we are replacing folders from the Port Rom to the Stock one , so in the end we will zip the Stock with the replaced files and folders right ? and thats the one we will flash , but in the Bug fixing section says:
    To fix black screen, Or messed up boot screen :
    Replace files from Stock to Port
    So if I´m getting the files from the Port Rom to the Stock One in the porting guide ,it is a little bit contradictory , I think

    ReplyDelete
    Replies
    1. in case you mistakely replace libMali.so from port to stock then you have to again replace libMali.so from stock(the unedited stock rom) to port(port is the newly edited stock rom)

      Delete
    2. Good , now is cristal clear , thanks for the help, i'll try again

      Delete
    3. no problem, hope you are learning well

      Delete
  11. Please what are all the files to replace for fixing camera

    ReplyDelete
    Replies
    1. depends on what the bug is, what is the problem ?

      Delete
  12. Can't connect to camera,flash and audio problems which affect mic too.

    ReplyDelete
    Replies
    1. replace libaudio.primary.default.so from stock to port to fix audio, to fix camera replace libcameracustom.so and libcamalgo.so

      Delete
  13. I tried it now, audio works but is cracking badly on higher volumes while camera does not still work.Any help please

    ReplyDelete
    Replies
    1. download a camera app from playstore

      Delete
  14. It didn't work too and the audio is really bad.

    ReplyDelete
    Replies
    1. try to report the ROM using the jelly bean porting guide it is in this website

      Delete
  15. I still have bootloop even when I replaced :
    libandroid_runtime.so
    2. libandroid_servers.so
    3. libmedia_jni.so
    From Stock to port

    ReplyDelete
    Replies
    1. are you using MTK droid tools made CWM ? if not please use it and have you flashed any ROM before successfully (rom not made for your device, rom which you ported)

      Delete
  16. sir ive been porting a rom to my mt6582 s5 clone device but i cant get it to boot always stuck at the first boot logo.. i even port the kernel of the device but it just wont boot how can i fix it ??

    ReplyDelete
    Replies
    1. what ROM are you using ? is the ROM made for your chipset mt6582 ? and is the android version the same as your android version ?

      Delete
    2. lollifox 4.4.2 and yes it is made for my device and it has the same android version

      Delete
    3. did you port using this guide ? followed every step ? and did you replace where it must be replaced and copied extra files where they must be copied ?

      Delete
    4. yes yes ive followed it all corectly i even repeated it 3 times

      Delete
    5. please report the ROM by just doing this :
      delete app, framework, fonts,media, priv-app in stock ROM copy all the above mention files from port ROM and paste the min stock ROM and if there are any extra files in the lollifox ROM then copy and paste them in stock ROM and change mount points and then flash

      good night i need to sleep school tomorrow

      Delete
    6. it entered the bootanimation but still wont boot to the android system... plss help

      Delete
    7. the first boot takes upto 5-10 mins

      Delete
    8. Hey man!!! thanks for yur help! i finally see that the android ver 4.4 indicated on my device is fake .... now my phone is booting diffrent kinds of roms i sensed that my device is an 4.2.2 jelly bean so thats why i cant boot any because ive downloaded a kitkat one mine is fake it is listed as 4.4.2 but its really 4.2.2 thanks!

      Delete
    9. no problem !!! have fun flashing new ROMs hope you like the ROMs i made

      Delete
  17. stock to port or port to stock, because in your other guides it was stock to port

    ReplyDelete
    Replies
    1. it clearly states that it is port to stock

      Delete
  18. I see that it clearly says stock to port, but I'm a curious noob and I have to ask.

    I'm wondering if it's possible to flash a stock 4.4.2 TCL S950 ROM (same phone hardware as Idol X 6040 and I already had the TCL ROM working 100%) on my Idol X 6040A that originally came with 4.2.2, and then port ColorOS 2.0.1?

    ReplyDelete
    Replies
    1. no you cannot flash a 4.4.2 rom on a 4.2.2 device unless they follow the same kernel base, you can try to port and flash, dude you can flash any rom to your device if you port it so it is no big deal if you ported a THL rom to your device

      Delete
    2. what is the Color OS Kernal version?

      Delete
    3. this is not the correct place to ask that

      Delete
  19. Use the ported boot.img or the stock one?

    ReplyDelete
    Replies
    1. if it is MIUI, LEWA, Color OS then port and replace if not then use stock

      Delete
  20. hi friend
    i need your help...
    i wonder if you know how to fix a camera issue on mt6592 chispet
    when i open the camera app it does not look fine...
    can you please hepl me ?

    ReplyDelete
  21. I'll just help the infinix hot note users cos that's the phone I have. I ported the S5 ROM using your tutorial and there's no single bug. Here's what I did :
    Delete these folders from /system/etc folder of port and replace with the stock folders
    Bluetooth
    Firmware
    Security
    WiFi
    Then replace the boot.img in /system with the ported one in my drive link and zip using es file explorer. Then backup, wipe data/factory reset,wipe dalvik cache and flash.
    Here's the link : https://docs.google.com/file/d/0Byi606_IGsiWZm5wc3dzMFRVR2M/edit?usp=docslist_api

    ReplyDelete
    Replies
    1. thank you for the help i will add your link in this post, if i get time

      Delete
    2. please register and post a thread about it here : http://mtk-xda.boards.net/

      Delete
  22. Hey I have a doubt.
    Here, it's given that we have to copy all files from ramdisk except init.rc
    But the mount points particular to my phone are listed in stock fstab
    If I replace it with fstab from port, how will it work?

    And.., in my stock ramdisk, I have files like init.sprout.rc init.sprout.usb.rc which are specific to my device.
    Do I have to leave those files as it is or delete them??

    Thanks :)

    ReplyDelete
    Replies
    1. you have to keep them as they are. that is why i said replace from port to stock and not delete files in stock and paste from port

      Delete
    2. Thanks for the reply :)

      BTW, why can't I port it to Android One which has same MT6582??
      Then how do I port it??
      Can you please direct me to somewhere where I can learn how??

      Delete
    3. because android one follows a new kernel series which is very different from MT6582 in other devices no wonder there are complete kernel sources for it. you can call android one the snapdragon for MTK

      Delete
  23. Can you help me fix the camera. When i open the camera app it turns into green and also when i call the one that i called cant hear me but i can hear him.

    mt6592 port rom-galaxy s5 lollipop

    ReplyDelete
  24. Mic doesn't work, what may be the fix?

    ReplyDelete
    Replies
    1. what ROM ? and i dont suppose this is a thread where you should be posting questions. post your question in the correcct thread

      Delete
  25. How to fix gfx/GPU/video problem in custom ROM?
    Pls tell. After installing a custom rom in my device the ROM successfully boot up but after using 2-5min the screen become black and reboots. It happens everytime when I boot Up in the ROM. Now The Question Is This Is A GPU/gfx/video problem if that how can fix it?

    Please Reply Quickly.

    ReplyDelete
    Replies
    1. replace libmali.so from stock to port

      Delete
  26. Replies
    1. you cannot.
      4.2 to 4.4 is only possible if the 4.4 ROM has the 3.4.5 kernel or the kernel version of your device is the same as the kernel version of the 4.4 ROM and mostly all 4.4 ROMs have 3.4.67 and jelly bean devices have 3.4.5. And 3.4.5 to 3.4.67 is not possible

      Delete
  27. Hello
    I am running now your aicp ROM for 6592 but the camera is green even after i tried to replacedlibcameracustom.so and libcamalgo.so

    ReplyDelete
    Replies
    1. replace from stock to port :
      libcameracustom.so
      libfeatureio.so
      libjpeg.so
      libdpframework.so

      and this is not the correct thread to post your question

      Delete
  28. Thank you camera is working properly. And the ROM is amazing thank you for your work.

    ReplyDelete
    Replies
    1. Awesome have fun and enjoy
      keep visiting for more amazing ROMs and please don't forget to click on ads, it encourages me to make more ROMs

      Delete
  29. Bro how to fix gps not working custom rom in mtk6582

    ReplyDelete
  30. Is there any ROM porting guides on Android 4.4.4 MTK6592 devices?

    ReplyDelete
  31. Is there any ROM porting guides on Android 4.4.4 MTK6592 devices?

    ReplyDelete
  32. Someone please port Miui 5.8.6_v6-4.4(HM NOTE 1W) or MIUI7 to Doogee Dagger DG550(MTK6592) specs is same like MiNote3G global i am from Beasil and try to port but always freeze on bootlogo some help or please port to some updated MIUI . For now i use a rom i found on NEEDROM = DG550 MIUI6 LankanDroid but is 5.3.10- have some bugs on bluethoofh and not smooth. sorry my bad english. tnks for all

    ReplyDelete
  33. Sir do you have tutorial for crossporting kitkat? 6582 to 6572? Sorry for the question

    ReplyDelete
  34. the guide for porting kernel it's unavailable

    ReplyDelete
  35. I get error:
    set_perm: some changes failed
    E:Error in /storage/sdcard/(rom).zip
    (Status 7)
    E:Installation aborted
    Please help.

    ReplyDelete
    Replies
    1. error in updater-script or there is problem in the zip

      Delete
    2. I have problem with any kitkat rom which I ported. When I start device, device go to bootloop. Please tell me, how to fix and what I don't work properly. I work as shown above.

      Delete
    3. 1. You do not have kitkat supported recovery
      2. You have not ported correctly
      3. There is problem in your stock ROM
      4. Your device is not supported

      Delete
  36. Same problem here bro i had tried porting3 ROMs but results same stuck on boot animation please help yar bro

    ReplyDelete
    Replies
    1. there are different methods for different ROMs. If it is CM, MIUI, and other ROM made from source porting kernel is required.
      There are multiple guides in the Porting Guide section of this website try all of them

      Delete
  37. Yes i tried it bro but nothing happen continuously runs in boot animation

    ReplyDelete
  38. Hey first of all thanks for your awesome roms.
    Now i have ported lollifox 4.4.2 to my mt6572 but it is very very very ( 5 mins later) very very slow or laggy so can you help me please?

    ReplyDelete
    Replies
    1. try to clear cache, and factory reset from settings > backup and restore, if still laggy try to use my Universal Speed Booster tweak

      Delete
  39. Will MTKROMS ever start working with cpu chipset past 65xx?

    ReplyDelete
  40. Sir..
    My phone is Xolo play 6x 1000...its mtk 6591..
    I tried to port as u directed...
    But it always ends in 'showing logo for hours ' els..'battery showing nil'...
    Pls help

    ReplyDelete
  41. I'm trying to flash the Note 5 ROM for MTK6582 and i followed this guide but i still ended up in a bootloop

    Please Help

    ReplyDelete
    Replies
    1. there are multiple guides in the post. Follow them all

      Delete
    2. use the miui 7 guide. i successfully ported note 5 rom. but im facing some bugs especially the touchwiz stop error.

      Delete
  42. I ported your Lollifox Lightweight on my mt6592 device but whenever after installing app like adobe reader....after opening it,a force close error comes......i tried rebooting,clearing app data,force stopping the app, but no help......plz tell me how to fix it sir plz.

    ReplyDelete
    Replies
    1. it is working for me bro, high end games like asphalt 8 work like butter. I have faced no such issues

      Delete
  43. Thanks for the guide bro.It works for me.I have ported lg g3 rom.But with one bugs.When I open file manager it get forced stoppes.And in storage setting phone storage show as unmounted.if I touch for mounting it shows that preparing phone storage and ang become the same as it was.Pls help me bro.

    ReplyDelete
  44. 8. Copy any extra files in the Port ROM-do i need to search manually any additional file or folder in the port rom? please be specific.

    1. Copy any extra file in /system/bin- for this step do i need to copy all files and just skip the same file? i even watch your video but i believe its not matching your guide. hopefully you can make some clarification about the steps so it will be morw helpfull for new porters like us. thanks

    ReplyDelete
    Replies
    1. they are two different guides, follow the video guide

      Delete
  45. thanks for the respond. you could also try to add some additional details like method 1 and method 2 so it will be more precisely. i have a queation and hopefully you can help me with this. do you know how to crossport mt6592 lollipop to mt6582? because i've been searching for that but it seems no one is sharing that method. i see only about crossporting but only same android version.

    ReplyDelete
  46. i follow the guide correctly for blisspop and aicp roms for my mtk6592 but its not booting to android system its just showing boot animation for both roms plz help thanks in advance

    ReplyDelete
    Replies
    1. the porting guide is in the post follow that, not this

      Delete
  47. Hi, I tried your porting guide to port YUN OS from Xolo 1010i to my Gionee M2 ..both shares MTK6582 Chipset...but Now Im stuck on BOOT ANIMATION...Any help plzzz....???

    ReplyDelete
  48. The mount pints on port rom seem to be the same as that on my stock rom, but the way there are two lines of code that start the script thus

    unmount("/data");
    unmount("/system");

    What do these mean?

    ReplyDelete
    Replies
    1. all you need to do is change the mount points according to the number assigned to the partition. It doesn't mean if there is an extra line. This is one of the most basic and basic concepts and you can't understand that much ?

      Delete
  49. My custom recovery says that mounting aborted hence the rom isn't flashed?

    ReplyDelete
  50. Hi, I just ported all the files and got stuck in the bootloop process... did what the fixed instruction u said...still no luck. Any idea? I am using a KitKat 4.4.2 (MTK6582) to MIUIv6. thanks in advance.

    ReplyDelete
    Replies
    1. dont use this guide for porting MIUI, try to use MIUI 7 porting guide for MT6582

      Delete
  51. Can i Flash a 4.4.2 Rom on an MTK6572 4.4.2 Android without porting?

    ReplyDelete
  52. Can i Flash a 4.4.2 Rom on an MTK6572 4.4.2 Android without porting?

    ReplyDelete
    Replies
    1. yes you can flash without porting but you will soft brick your device

      Delete
  53. Can u tell me how to fix softkey button ? I already replace generic.kl and mtk-pd.kl but it not working yet . please .

    ReplyDelete
  54. I used your above mentioned porting guide to port touch os
    But after porting it is not showing internal storage and also when we open gallery it shows no external storage available
    Browser , FM, file manager etc are force closing too...
    So I tried replacing storage list XML from stock to port.. Still the problem persists
    Can u help me out
    Pleasee

    ReplyDelete
  55. i have downloaded the roms but they are .img files .
    any way to extract them?

    ReplyDelete
  56. Pls can I port oxygen 5.0 ROM for 6572 to my KitKat 4.4.2 mtk6572 tablet ?

    ReplyDelete

Powered by Blogger.