Porting MTK ROM to your Android Device

Here is a completely re-written guide to Port MTK65xx Roms.

So, Many Of You May be MTK Device User than you are at right place to fill your device with many awesome roms!

Note: Android ONE devices (MT6582 SoC) use Google's device tree, meaning they differ on everything with all the other MediaTek devices (even the ones with the same SoC , MT6582), as per @superdragonpt told us

Requirements:
A MTK powered device
USB Cable
Usable Brains
Knowledge about Flashing & Taking Logs
Stock Firmware (from manufacturer) & Port Firmware (matching specification of your device)
Custom Recovery installed on device

Porting Tips
Choose Custom ROM from a device matching same resolution to reduce App Size related bugs
This Guide Applies to
MT6577 to MT6577, vice-versa
MT6589 to MT6589, vice-versa
MT6572 to MT6572, vice-versa
MT6582 to MT6582, vice-versa
Note: Try it at your own risk, and don't complaint any developer or XDA if any mishap takes place.
TUTORIAL:
Starting with the tutorial, I request you to follow every single step written below to prevent any kind of problem in flashing and causing bootloop. I also dare you to take a nandroid backup of your current rom you are using.
Get. Set. Go.

Step 1 : Patching System Folder for the port patch.
First of all make a folder named "Port_Patch" and setup all the folder as shown in the images below.

Now, in Port_Patch make system folder in which make folders, "bin" "etc" "lib" "usr" "vendor" "xbin" (without ")
In folder "bin" copy pq & vold from your stock rom
In folder "etc" copy "bluetooth" "firmware" "wifi" "apns-conf.xml" "vold.fstab" "vold.fstab.nand"

In folder "lib" copy files as shown in the image

In folder "usr" copy usr/keylayout/Generic.kl

In folder "vendor" all the files

In folder "xbin" copy "libmnlp_mt662x" (x - '0' or '8') from stock


System has been patched, copy this /system to patch the /system of port ROM.
Step 2: Patching the boot.img of the port rom.
This is bit tricky but can be done easily.
So, first of download this little tool, to unpack & repack your boot.img - MTKbootimg.zip - tested on Windows 7 & above platform
Extract the Tool and you will get two folders named "stock" & "port"
Copy boot.img's respectively from stock rom in "stock" folder & from port rom to "port"
Unpack both boot.img repectively and they may look like this.

From stock copy "kernel" to port folder and just replace it.
Now, repack it, new file named "boot-new.img" will be generated.
Copy "boot-new.img" to port Rom Folder.
Delete existing "boot.img" and rename "boot-new.img" to "boot.img"

Now, your boot.img is patched, proceed to last step.
Step 3: Modifying updater-script to install ROM accordingly.
So, it's the last step before flashing the rom. Now lets fix it.
First, you have to know your device mount points, that can be tracked using MTKDroid Tool or check them in stock rom updater-script.
I have my flashable stock rom so I will get mount points from it.
As show in the image, my stock updater have different mount point for system & data while port have different.

Now, replace "mmcblk0pX" (X - no. for the mount) from stock to port as designated for the partition.
Now Save the updater-script.

Finally, the ROM is ready to flashed.
Step 4: Compressing & Flashing the ROM.
Now, the rom is ready to be packed and flashed.
Simply get to the main directory with META-INF, system, boot.img, etc files.
Select all the files and compress them to zip. Select the compression ratio as you want.
After compressing copy the ROM into root of sdcard
Enter Custom Recovery, wipe data & Cache
Flash the ROM.zip wait till it completes.
Wait till it boots, or else take log using ADB logcat. (Hint: If LED light blinks, the rom is booting)



#iyke quame

Comments

Post a Comment

Popular posts from this blog

[GUIDE][PORTING][MEDIATEK][mt6580]Android 6.0.x Marshmallow ROM Porting Guide-figured

Lollipop n Marshmallow System Extractor and Repacker Version 1.60

[CM] [ROM] [6.0.1] CyanogenMod 13 Unofficial - TECNO W4