mtk rom porting guide

(INSTALL BELOW THINGS AS PER YOUR OS BIT VERSION,IF YOU HAVE 32 BIT OS THEN INSTALL 32 BIT STUFFS AND IF YOU HAVE 64 BIT OS THEN CHOOSE 64 BIT STUFFS.
  • WIndows Running PC or Laptop.
  • 7zip Compressor-Download
  • Notepad++ -Download
  • Time(as per you how much take to understand)
  • Your Base Rom(stock Rom,in any format-CWM flashable or SP_tools Flashable,Prefer to have Both)
  • CWM Recovery
  • SD card & Card Reader.(some phones do not have SD slot so no worry for them,i have alternative way)
  • APKTOOL- DOWNLOAD
  • SP_Flash Tools to Unbrick In case Device Get Bricked- Download

  • mtk boot img tools link




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.
GetSetGo.

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.


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

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

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

  6. In folder "vendor" all the files

  7. 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.
  1. So, first of download this little tool, to unpack & repack your boot.img - MTKbootimg.zip - tested on Windows 7 & above platform
  2. Extract the Tool and you will get two folders named "stock" & "port"
  3. Copy boot.img's respectively from stock rom in "stock" folder & from port rom to "port"
  4. Unpack both boot.img repectively and they may look like this.

  5. From stock copy "kernel" to port folder and just replace it.
  6. Now, repack it, new file named "boot-new.img" will be generated.
  7. Copy "boot-new.img" to port Rom Folder.
  8. 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.
  1. So, it's the last step before flashing the rom. Now lets fix it.
  2. First, you have to know your device mount points, that can be tracked using MTKDroid Tool or check them in stock rom updater-script.
  3. I have my flashable stock rom so I will get mount points from it.
  4. As show in the image, my stock updater have different mount point for system & data while port have different.

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

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

Share this

Related Posts

Previous
Next Post »

6 comments

comments
August 17, 2015 at 6:04 AM delete

can i use it for crssporting mt6582-6592? if not please made a tutorial for it..:)

Reply
avatar
September 20, 2015 at 8:45 PM delete

hey bro can u upload these images in the guide more clear they are not visible

Reply
avatar
October 1, 2015 at 1:26 AM delete

How to go about it if the ROM to be ported is in a form that is suitable for SP Flashtool and not CWM recovery? U have not mentioned this. There will be no System Folder, neither META-INF folder.

Reply
avatar