Guide to port MT6592 or MT6582 or MT6591 Roms


                            Guide to Port Mtk roms 


This porting method works for
mt6592 to mt6592  or
mt6591 to mt6591  or
mt6592 to mt6591  or
mt6591 to mt6592

(Maybe this works for other chipsets also like mt6582 to mt6582)


IF THIS DIDN'T WORK FOR YOU YOU CAN TRY OTHER GUIDE(can port 4.4.4 with 4.4.2 stock rom also) FROM  ME FROM HERE_Click me


This porting method works for
all roms like miui ,xperia ,vibe,asop etc

Only thing is the base rom and port rom must be of same android version
Like 4.4.2 to 4.4.2 or 4.4.4 to 4.4.4 (but it may works for cross porting like 4.4.2 to 4.4.4)

people call well explained easy guides as NOOBS GUIDE, but i call it NEWBIE'S Guide

DO EVERYTHING AT YOUR OWN RESPONSIBILITY,i wont be responsible to whatever happens to you,your phone,or sim or sd card or anything
 

Reqiurements
1.both rom rom in.zip(recovery flashable type)
2.Computer
3.Time(it depends on you,5min to 20 min)

Lets start Porting
1. Extract both roms in two different folders,rename the rom which is working for your device as BASE and the new rom which you want to port for your device as PORT
2.Now open both folders ,then copy these files from base folder to port folder
3.copy / replace from based to port [If anything missing,just Skip it]
bin/ccci_fsd
bin/ccci_mdinit
bin/boot_logo_updater
bin/factory
bin/rt.sh
bin/sutemp
bin/sysinit
bin/uafs
bin/vold
bin/wmdsi
bin/wpa_supplicant
remove etc/firmware and etc/mddb from port/etc folder
copy from base to port and replace
etc/firmware folder (all files )
etc/init.d
etc/mddb (all files )
etc/permissions/android.hardware.camera.xml
etc/permissions/handheld_core_hardware.xml
etc/permissions/platform.xml
etc/agps_profiles_conf.xml
etc/factory.ini
etc/install-recovery.sh
etc/recovery-resource.dat
lib/egl  folder (all files )
lib/hw folder (all files )
lib/libaudio.primary.default.so
lib/libaudiocompensationfilter.so
lib/libaudiocustparam.so
lib/libaudioflinger.so
lib/libcam.paramsmgr.so
lib/libcamdrv.so
lib/libcameracustom.so
lib/libEGL.so
lib/libdpframework.so
lib/libhwm.so
lib/libhardware_legacy.so
lib/libipod.so
lib/libsync.so
lib/libMali.so
lib/libshowlogo.so
lib/libvcodecdrv.so
lib/libsensorservice.so
vendor folder  (all files )
xbin  folder(all files )


4.Now copy and replace boot.img present in stock rom to port rom if its an asop rom

OTHERSWISE,

You need to replace bootclass path pin int.rc file present in boot.img ..Guide here:click me
VIDEO GUIDE COMING SOON,STAY TUNED

5.Next step is open Meta-inf folder/google/android/updater script with notepad++  from here
  you will see these lines or more than these lines
{ mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/data");
  format("ext4", "EMMC", "/dev/block/mmcblk0p5");
  mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
}

here you see 5 and 7 ...but this maybe different for your device,to know that open updater script file from the stock rom(BASE) and  look at it...
Now replace those those number from BASE UPDATER SCRIPT TO PORT UPDATER SCRIPT and save it

6.LAST AND FINAL STEP
  Install winrar if you already havent from here 
 now select META-inf,system,boot ,data(if you have) and right click,select add to archive
 select zip from opening window and click ok...
After that copy to sd card and flash via recovery

IF THIS DIDN'T WORK FOR YOU YOU CAN TRY OTHER GUIDE BY ME FROM HERE_Click me



BUG FIXING

If you found any bugs repalce from BASE to PORT



Bootloop?  

Replace following files(from stock to port):

Code:

libandroid_runtime.so

libandroid_servers.so

libmedia_jni.so


FOR CAMERA NOT CONNECTED ISSUE / CAMERA GREEN / CAMERA FORCE CLOSE "unfortunately camera has stopped"
No success after the files replaced above then keep on replacing one file at a time and check.
Camera problem is the one major bug in this type of porting. You have to have patience. This will take half of your energy. 
Replace all "libcam*.so" files from stock to port if even after trying these files camera can't connect (It may lead to bootloop if ROM boots successfully)

Another fix Init.rc (very important)
Unpack port boot.img and stock boot.img
compare the init.rc file inside extracted boot.img and find (ctrl+F)“cam”. Copy and replace ALL lines related to camera from stock boot.img to port ROM boot.img.
Now repack the boot.img from tool

 FOR FLASH LIGHT NOT COMING FROM CAMERA
Replace libfeatureio.so from /lib

 FOR FM PROBLEM
Replace from /lib/module folder mtk_fm_drv.ko

 TO FIX GPS
Replace from/lib/module folder mtk_stp_gps.ko

 TO FIX COMPASS
Replace libsensorservice.so from /lib

 TO FIX VIDEO SHOWING PIXELS AND GLITCHES
Replace libvcodecdrv.so from /lib

 SHOWING WRONG RAM INFO IN TASK MANAGER
Don't change ro.product.device value in the build.prop.

 FOR GREEN CAMERA/ LAG / NO WALLPAPER / NO STATUS BAR (IMPORTANT FILE FOR MT6582)
Replace libdpframework.so from lib folder

 PROBLEM WITH 2G/3G SWITCH
Open Dialer and type *#*#4636#*#* 
If a Pop Up appears go to Phone Information and choose your preferred network type.

 PROBLEM DOWNLOADING EPO
Replace in framework folder
mediatek-common.jar
mediatek-framework.jar
mediatek-op.jar
mediatek-telephony-common.jar

 ANY RESOLUTION PROBLEM
Add this line to build.prop
ro.sf.lcd_density=your phone screen dpi
ex- ro.sf.lcd_density=480 for FHD devices

 SOME KEYS NOT WORKING
Replace keylayout folder under /usr. If still not work then replace the whole /usr folder.

 TOUCH SCREEN PROBLEM
(Sometimes screen behaves weird ..means for example if you touch bottom left effect on top right ...almost opposite response)
Replace libinput.so from /system/lib folder.

 BOOTLOOP ON HDC CLONES
Replace libsync.so from /system/lib folder.

 WIFI TETHERING PROBLEM
Replace dnsmasq from /bin folder.

 SCREEN IS UPSIDE DOWN
In build.prop find this line
ro.sf.hwrotation=0
change the value 0 to 180.
ro.sf.hwrotation=180

 Problem with Proximity Sensor
Replace nvram.so, nvram_platform.so, nvram_daemon_callback.so

SD Card not mounting or not working
In the framework-res.apk of your port, replace /res/xml/storage_list.xml from stock one.

USB storage not mounting
Unpack your boot.img replace init.usb.rc from ramdisk by stock boot.img init.usb.rc

 FOR WIFI TOGGLE PROBLEM
Replace wide-dhcpv6, wifi in /etc folder

IF THIS DIDN'T WORK FOR YOU YOU CAN TRY OTHER GUIDE BY ME FROM HERE_Click me


IF YOU PORTED A ROM SUCESFULLY WITH THIS METHOD COMMENT A THANKS And your device name

15 comments:

  1. hey...this tutorial worked for my mmx e311 .Finally an awesome tutorial i got,i finally got my rom booted...the rom which i ported was miui 7
    I need ur help...actually,even after doing all things for the camera u hv mentioned,its still greeen(and when i replaced all files starting with libcam...so,the camera wont even connect)
    also the storage problem isnt fixing .followed all of ur steps correctly..
    please help(my device is having chipset mt6592m)

    ReplyDelete
    Replies
    1. nice to hear...
      For green camera..you need to
      replace libdpframework.so in lib folder from stock to port
      Also you need to edit init.rc file inside boot.img
      do you know how to extract boot.img?

      Delete
    2. I had replaced libdpframework.so (i hv mentioned above tht i hv done everything frm the tutorial), still cam wont work....

      To extract boot.img,i recommend u to use dsixda's android kitchen, not only it will help u for bootimg extraction,bt also for modifying urr stock rom like deodexing,including root abd busybox and many other things..

      Delete
    3. ok...then copy all extra lines under #camera from stock rom init.rc( inside boot.img)
      to port rom init.mt65xx.rc (xx=>>92 or 91 or 82 etc)

      Delete
    4. I hope you already replaced libcamlgo.so
      libcameracustom.so
      libfeatureio.so

      Delete
    5. will u pls..... share the rom u prepared ... need that urgently it will help me much i am trying to fix those bugs .... if u will let me to by sharing the zip u prepared for miui 7
      @Prathmesh pande

      Delete
  2. thank you this guide is very helpfu

    ReplyDelete
  3. my keyboard won't popup.not even third party keyboards also.tried 3 different keyboard.any solution?

    ReplyDelete
    Replies
    1. When it dint?
      Try to choose it as default in settings

      Delete
  4. would you help to make video call working for xperia z2 like you did here?
    i was googling about it but zero results
    iam indonesian so my english realy bad
    thanks
    you can contract me at joniantoro@gmail.com

    ReplyDelete
  5. Can i use this guide to port the Bugless CM12.1 ROM to a BQ Aquaris E6 (KK 4.4.2)? Thanks in advance.

    ReplyDelete
  6. bro is it applicable to lollipop devices also ?

    ReplyDelete
  7. is it possible to use this guide in porting lollipop based rom ? i have a device that has MT6592 chipset and 3.10.72 kernel

    ReplyDelete
  8. please port a good rom for Intex Cloud Tread.

    Please please please

    ReplyDelete