Skip to main content

[GUIDE] [PORT] [ROM] All About Mediatek ROM Porting

*** ##TUTORIAL ...

HOW to Port ROMs...

For Begineers & Advanced Users

Almost Any Device to Any Device!


ONLY FOR MEDIATEK SoCs

In This Guide You'll Learn..

How to Port ROMs From the Same CPU

And Also..

HOW TO PORT ROM FROM A DIFFERENT SoC!!!!!


Works for-

MT6589 to MT6577

MT6582 to MT6572

MT6577 to MT6575


MT6572 to MT6572


Only ICS to ICS & JB to JB

May also work with 4.1 to 4.2

No Need of Source Code

No Need of Kernel Source

No Need of **ANDROID KITCHEN

No Need of LINUX... 


Requirements:

* A Brain
* Patience
* Windows XP/7/8
* 7-Zip
* Notepad++
* Bootimg Unpack/Repack Tools for Windows!
* Stock ROM
* And a Little Respect!!


So now Lets Begin...

PORTING For Same SoCs ( Ex: MT6572 to MT6572)

* Replace these from your Stock ROM to the ROM u want to PORT!! Lets Call it "PORT"

FILE LIST FOR REPLACING: 

*system/vendor
*system/usr
*system/lib/modules
*system/lib/hw
*system/lib/libncurses.so
*system/etc/firmware
*system/etc/vold.fstab
*system/etc/vold.fstab.nand
*system/etc/bluetooth


For Fixing Problems...

*system/etc/permissions
*system/etc/security
*system/etc/audio
*system/etc/wifi
*system/lib/drm
*system/lib/egl
*system/lib/soundfx


* Now Replace the Stock Boot.img to Port ROM!

* Now Open The Port ROM folder and go to META-INF/google/android and open updater-script in Notepad++

* Do the same for the Stock ROM

* Now In the Port ROM's Updater Script, find a line that starts with this...

format(".......

and only replace the mmcblk0p.. with the stock one!

* Do the same for this line...

mount("...
Example: 

This is the PORT one!!!

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


This is the Stock one!!

format("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");


Now just Replace the "mmcblk0p3" from STOCK to PORT!!

It should look like this:

format("ext4", "EMMC", "/dev/block/mmcblk0p3", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");


DO NOT REPLACE THE WHOLE LINE!

* Now go back to the Folder of Port ROM and You'll see 2 folders & 1 file named

-META-INF
-system
-boot.img


* Now Select these three and Click Right Mouse Button and Click on 7-Zip ->> Add to Archive

* Now a dialouge box should appear!

* Configure the Format like This:

Archive format: ZIP

Compression Level : Normal

Compression Method: Deflate

Dictoioany Size: 32k

Word Size 32


* Now Start Zipping and Push the ZIP to your Memory Card

* Go to Recovery >> Install ZIP & Wipe Data

Finished!!

Now was that so hard?? Its a Really Easy thing to d0!!

Now Come to the Hard Part!!

Porting From Different SoCs ( Ex: MT6582 to MT7572 )

Read this carefully & apply the way i say!

* Take the ROM u want to port & name it PORT!
* Take your Stock ROM & Name it Stock
* Now Replace These files from Stock to PORT--


*system/vendor
*system/usr
*system/lib/modules
*system/lib/hw
*system/lib/libncurses.so
*system/etc/firmware
*system/etc/vold.fstab
*system/etc/vold.fstab.nand
*system/etc/bluetooth


* Now Open build.prop in notepad++ & Search for this line

ro.mediatek.platform=MT65xx

Now Replace this (MT65xx) with your CPU!!

For Example

ro.mediatek.platform=MT6572

* Now Go To META-INF/google/android and open updater-script in notepad++

* Add this line between the lines of "set_perm"

set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.mt65xx.so");

[Replace the mt65xx with your cpu]

Example:

set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.mt6572.so");

* Now Go back to the Rom folder and Take the boot.img and decompile it with any bootimg-unpack tool!

* Now delete the zimage and rename boot.img-ramdisk to PORT-Ramdisk

* Now Do the Same for Stock boot.img and open the folder named PORT-ramdisk and copy all the files from PORT-ramdisk to boot.img-ramdisk of your Stock boot.img

* Now Go to boot.img-ramdisk and open init.rc

* Now find these lines and replace with your cpu
#Create Chip Property
on early_property:ro.hardware=mt6582
setprop ro.mtk.hardware mt6589

on early_property:ro.hardware=mt6589
setprop ro.mtk.hardware mt6589



example :

#Create Chip Property
on early_property:ro.hardware=mt6582
setprop ro.mtk.hardware mt6572

on early_property:ro.hardware=mt6589
setprop ro.mtk.hardware mt6572



* Now Compile your New boot.img and Pack your New ROM and Flash!!

Cheers!!!!

Porting Lewa OS5 ROM:

* Replace These files from Stock to LeWa OS5 ROM

*system/vendor
*system/usr
*system/lib/modules
*system/lib/hw
*system/etc/firmware
*system/etc/vold.fstab
*system/etc/vold.fstab.nand
*system/etc/bluetooth


* Replace Stock boot.img to Lewa OS5 ROM

* Unpack boot.img

* Open init.rc

* Find these lines

on early_property:ro.build.type=user
write /proc/bootprof "INIT: user build setting"
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar

on early_property:ro.build.type=userdebug
write /proc/bootprof "INIT: userdebug build setting"
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar


on early_property:ro.build.type=eng
write /proc/bootprof "INIT: eng build setting"
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar:/system/framework/emma.jar



* Now Add this line in the end of 1t and 3rd line

:/system/framework/lewa-framework.jar

Example: 

on early_property:ro.build.type=user
write /proc/bootprof "INIT: user build setting"
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar:/system/framework/lewa-framework.jar

on early_property:ro.build.type=userdebug
write /proc/bootprof "INIT: userdebug build setting"
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar


on early_property:ro.build.type=eng
write /proc/bootprof "INIT: eng build setting"
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar:/system/framework/emma.jar:/system/framework/lewa-framework.jar


* Now Compile the new boot.img and Repack your New Lewa OS5 ROM

Porting MiUI ROM

Replace These files from Stock to MiUI ROM

*system/vendor
*system/usr
*system/lib/modules
*system/lib/hw
*system/etc/firmware
*system/etc/vold.fstab
*system/etc/vold.fstab.nand
*system/etc/bluetooth


* Replace Stock boot.img to Lewa OS5 ROM

* Unpack boot.img
* Open init.rc
* Find these lines

on early_property:ro.build.type=user
write /proc/bootprof "INIT: user build setting"
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar

on early_property:ro.build.type=userdebug
write /proc/bootprof "INIT: userdebug build setting"
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar


on early_property:ro.build.type=eng
write /proc/bootprof "INIT: eng build setting"
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar:/system/framework/emma.jar



* Do the Same as Lewa and add this line in the end of 1st and 3rd line.

:/system/framework/miui-framework.jar

* Compile the New Boot.img and Repack your new ROM and FLash!!

Cheers!!

Enjoy your New ROM and Give Credits to me for if I Helped you! 

For Advanced Users:

PORTING FIX:

Framework:

* decompile framework.jar

* Go to 

\smali\com\mediatek

* Replace All Files from STOCK to this Folder

* Now go to

\smali\com\android\server

* Replace All Files from STOCK to this Folder

* Compile framework.jar and Push to Device!

* This Should FIX Bootloop, Mms.apk, Phone.apk, Settings.apk, Contacts.apk Force Close

* Fixing Other Problems:

Files related to Specific hardware:

* Replace if Not Working!!

* Camrea:

\system\lib\libcamalgo.so
\system\lib\libmhaldrv.so
\system\lib\libcamera_client.so
\system\lib\libcameracustom.so
\system\lib\libcameraprofile.so
\system\lib\libcameraservice.so


* GPS:

/system/xbin/libmnlp

* Bluetooth & Wifi:

/system/lib/libbluetooth_mtk.so
/system/lib/libbluetoothem_mtk.so


* Radio:


\system\lib\libaudio.a2dp.default.so
\system\lib\libaudio.primary.default.so
\system\lib\libaudiocompensationfilter.so
\system\lib\libaudiocustparam.so
\system\lib\libaudioeffect_jni.so
\system\lib\libaudioflinger.so
\system\lib\libaudiosetting.so
\system\lib\libfmar1000.so
\system\lib\libfmcust.so
\system\lib\libfmjni.so
\system\lib\libfmmt6616.so
\system\lib\libfmmt6620.so
\system\lib\libfmmt6626.so
\system\lib\libfmmt6628.so



* For Fixing Wifi & FM-Radio do this!

(NOT NEEDED IN MT6572)

fmradio.driver.chip=1

(Change it to 3 if yours is MT6628)

mediatek.wlan.chip=MT6620

(Replace mediatek.wlan.chip=MT6620 to your WLAM Chip Type Ex: mediatek.wlan.chip=MT6628 for MT6628)

mediatek.wlan.module.postfix=_mt6620

(Replace mediatek.wlan.module.postfix=_mt6620 to your WLAM Chip Type Ex: mediatek.wlan.module.postfix=_mt6628 for MT6628)

* Now open updater-script and Find this line or ADD a New one(If Not Found)!!

symlink("wlan_mt6620.ko", "/system/lib/modules/wlan.ko")

(Replace wlan_mt6620.ko to your WLAM Chip Type Ex: wlan_mt6628.ko for MT6628)

Popular Posts

[ROM][6.0.1]Full Advance 6.0.1 For I9000

Full Advance 6.0.1

Samsung Galaxy S (i9000)

Full Advance is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. Full Advance does still include various hardware-specific code, which is also slowly being open-sourced anyway.


Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*
* Submitting bug reports on unofficial builds is the leading
* cause of male impotence.
*/
Installation Instruc…

LolliFox v.1.9.1 BETA For MT6572

In LolliFox v.1.8 BETA Changes in the new version:
* The status bar at the gallery
* Refinement style dialer settings
* Corrections in the SMS / MMS
* Refinement calendar
* Contact icon on the left
* Materialization FM-Radio
* Materialization Downloads
* The materialization of the File Manager
* Light engineering theme menu
* BatteryMeterView with android 4.4
* English version is back
* Fixed VPN
* minor fixes In the full version:
* Fixed GPS
* Updated Google Play 5.3.5
LolliFox v.1.9 BETA Changes in the new version:
* Added Some Apps like, «Sim Toolkit», «Taskmanager», «Root Explorer»
* Materialization gallery
* Materialization calendar
* Materialization hours
* List of changes in the settings
* Removed the section «Safety information» from the Settings — About phone
* Fixed navigation bar
* Fix file manager
* Fixed synchronization of contacts and calendar
* Minor fixes graphics system
* Small changes in the settings
* Minor changes in the application of hours
* Many small edits in m…

[ROM][5.1.1]Full Advance 5.1.1 For I8190

Full Advance 5.1.1
Samsung Galaxy S3 Mini

Full Advance is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. Full Advance does still include various hardware-specific code, which is also slowly being open-sourced anyway.


Code:
#include 
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*
* Submitting bug reports on unofficial builds is the leading 
* cause of male impotence.
*/
Installation Instructions


Coming from 5.1.1 o…

IOS 8 Rom For MT6572

IOS 8 Rom


Features


Rom Version: 4.2.2 With Root 
- ODEX 
- Prerooted with SuperSU 
- Playstore 
- Android 4.2.2 with iOS8 skin on top  - Multilanguage Indonesia Ready Guys - Duel 3G - Include GAPPS  - Smooth - Original iPhone Lockscreen iOS 6 8 - Slide To Unlock - Slide To Power Off - Siri - Iris Recents Apps - Compass - Notification Center - Touch ID And Passcode To Lock Phone - ICloud - Typical Transition Effect iOS 8 - Gesture Offscreen shorcuts - Touch ID Simulation - Support Smart Eye Scroll And Smart Pause - Apple Bootanimation - Comes With Apple Bootup Logo, Can Be Activate With * # 0066 # - Similar Anyway Deh equally authentic  - And Many More Guys Download ScreenShots:



Full Advance 5.1.1 For I9000

                       Full Advance 5.1.1

                                                     Samsung Galaxy S (i9000)

On Xda








Full Advance is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. Full Advance does still include various hardware-specific code, which is also slowly being open-sourced anyway.


Code:
#include
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 *
 * Submitting bug reports on…

Xperia Kitkat Custom Rom For MT6572

1) Super Smooth, Super Fast & Stable. 2) Xperia Z Look 3) Air Gesture Enabled (Working) 4) Pre Rooted. 5) Better Gaming Performance. 6) 100% Bugless ( I am using this ROM) 7) Xperia Album, Walkman, Social Life and many more APK pre Installed. 8) Android Version 4.4.2 KITKAT
Download Link : [Click Here]

Patch For Disabling Navbar : [Click Here] Lets See Some Screenshot:

Ultra Lollipop Rom For MT6572

*Upto 250 mb free using whatsapp
*best gaming ROM ever
*gapps excluded 
*lollipop call
*Apollo music
*new browser 
*camera works 
*Fully lollipop themed
*Size only 162 MB

Lightest Rom
Smooth and Stable










Download link


Credits;

Nehal Battulwar
Siong