images (1).png



Mediatek Cross-Platform Rom Porting Guide for Mtk 6572/82/92 SoCs



 



Requirements :



  • Fully understand the Rom Porting Guide.

  • This Guide will work only for Mtk SoCs with same GPU 


          (Like : MT6582 MT6592 (Both have same GPU-Mali400)

  • Stock Rom &Port Ros must have the same SDK Version (Like: 4.2.x4.2.x , 4.4.x4.4.x ,5.0.x5.0.x,5.1.x5.1.x,6.0.x6.0.x,etc )

  • Lots of Patience and a Sharp  Brain :)


=======================================================================

=======================================================================

Method 1 :


Step 1: Take Base Rom & Port Rom, open in two different tabs.


Step 2 : Open base rom, system folder and delete these following folders/files -



  • Apps

  • Fonts

  • Framework

  • Media

  • Priv-App

  • Build.prop


Step 3 : Copy these folders from Port to Stock -



  • Apps

  • Fonts

  • Framework

  • Media

  • Priv-App

  • Build.prop


Step 4 : Open Port Rom's Bin folder and copy these files -



  • Installed

  • Factory

  • ServiceManager


& paste them to Stock's Bin folder.


Step 5 : Open Port's Lib folder and copy these files - 



  • libandroid_runtime.so

  • libandroid_service.so

  • libandroidfw

  • libart.so

  • libart-compiler.so

  • libbluetooth_jni.so

  • libdvm.so

  • libEGL.so

  • libfmjni.so

  • libGLES.trace.so

  • libGLESv1_CM.so

  • libhwm.so

  • libhwui.so

  • libinputservice.so

  • libmedia_jni.so

  • libwebviewchromium.so


& paste them to Stock's Lib folder.


Step 6 : Open Port's Bin folder and copy all bin files, then paste it to Stock's Bin folder (Skip the existing files)


Step 7 : Open Port's Etc folder and copy everything, then paste them to Stock's Etc folder (Skip the existing files)


Step 8 : Open Port's Etc/Permission folder and copy everything, then paste them to Stock's Etc/Permission folder (Skip the existing files)


Step 9 : Open Port's Lib folder and copy everything, then paste them to Stock's Lib folder (Skip the existing files)


Step 10 : Open Port's Usr folder and copy everything, then paste them to Stock's Usr folder (Skip the existing files)


Step 11 : Open Port's Xbin folder and copy everything, then paste them to Stock's Xbin folder (Skip the existing files)


Step 12 : Open build.prop and replace these lines



  • "ro.mediatek.platform=MT6572/82/92" with your mtk version.

  • "mediatek.wlan.chip=CONSYS_MT65XX" with your version.

  • "mediatek.wlan.module.postfix=_consys_mtxx" with your one.



  • ro.sf.hwrotation=180(Only for Micromax Unite 2/Clone users)

  • Others use ro.sf.hwrotation=0

  • ro.sf.LCD_density=(whatever you want) Default is 240




Step 13 : Compress the Stock with "7Zip/WinRar"



Thats It ! Flash it via custom recovery....



=======================================================================


=======================================================================


Method 2 :



Requirements :-



-Carliv image kitchen
-Winrar or 7zip
-notepad++



Step 1 : Take a Stock Rom And Port Rom



Step 2 : Extract them & open in 2 different tabs.



Step 3 : Open System Folder in both Roms



Step 4 : Open System Folder in both Roms & Copy these files from Stock's Lib to Port's Lib




  • LibMali.so



Step 5 : Open System/Lib/Hw folder  in both Roms & copy these files from Stock's Hw folder to Ports Hw folder.




  • hwcomposer.mt65xx.so

  • gralloc.mt65xx.so



Note : Rename mt65xx to your mt65xx version. 

Like this --> (Only for mt6582)

hwcomposer.mt6592.so hwcomposer.mt6582.so

gralloc.mt6592.so gralloc.mt6582.so

For mt6572 replace above mentioned files with mt6572 in place of mt6582


Step 6 : Open System/Etc in both Roms & copy these folder




  • Bluetooth

  • Firmware

  • Wifi



Step 7 : Open Meta-Inf folder, using Notepad++ open updater script of Port's Rom. Modify Mounting points according to your updater script.



Note : Mounting points may vary according to Kernel Version.

For Example :-

For Kitkat Kernel based Rom the mounting point of "System" will be like this "mmcblk0p5"

For Lollypop Kernel based Rom the mounting point of "System" will be like this "mmcblk0p6"






                                            Most Important Step


Step 8 : Copy the boot.img of both Stock Rom & Port Rom. Rename them to "Boot-stock" & "Boot-port"



  • Open Carliv Image Kitchen and paste the copied Boot.img into the "Boot-Resources" folder


Screenshot - 14-11-2016 , 03_34_37.png

Screenshot - 14-11-2016 , 03_41_24.png

  • Double Click on Carliv


Screenshot - 14-11-2016 , 03_34_52.png









  • You will see the following screen (Either in windows or Linux) :-








  • Type "B" for Boot image.  Then you will see this window :



Screenshot - 14-11-2016 , 03_43_59.png


  • Type 1 or 2 according to which boot you want to extract first.




screenshot-14-11-2016-03_44_24






  • After extraction you will see the new folders like this :



Screenshot - 14-11-2016 , 03_51_45.png


  • Open Boot-Stock folder and copy these files :

  • boot.img-kernel

  • ueventd.rc from ramdisk folder



Like this :- 

Screenshot - 14-11-2016 , 03_52_11.png

Screenshot - 14-11-2016 , 03_52_27.png


  • After this again double click on "Carliv" file & Type (number which contains "boot-port") , Then type  "4" to repack your port boot.img



Screenshot - 14-11-2016 , 03_45_44.png


  • Now Go to output Folder there you can find your new boot image.



Screenshot - 14-11-2016 , 04_06_50.png


  • Just rename it to "boot.img", then copy it & paste it to Port Rom Folder (Replace existing boot.img).



Step 9 : Open build.prop and replace these lines




  • "ro.mediatek.platform=MT6572/82/92" with your mtk version.

  • "mediatek.wlan.chip=CONSYS_MT65XX" with your version.

  • "mediatek.wlan.module.postfix=_consys_mtxx" with your one.

  • ro.sf.hwrotation=180(Only for Micromax Unite 2/Clone users)

  • Others use ro.sf.hwrotation=0

  • ro.sf.LCD_density=(whatever you want) Default is 240



Step 10 : Compress the Port Rom using 7Zip/WinRar & Flash it via Custom Recovery.



=======================================================================


=======================================================================






Credits :



XDA



AMD



Royal Porting Team



Amitava Bhowmick



Sunmughan Swamy

Sunmughan Swamy

Sunmughan Swamy

I am a Pro Blogger cum Android Developer. I am desperately passionate about developing Android Apps and Roms for Android Devices. I used to listen music during my work, meanwhile play video games,outdoor sports and much more. I have only 4 passion :-
Design | Code | Compile | Debug

Post A Comment:

0 comments: