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