Porting Guide Q


Pinoy Techie
Follow these steps to start porting:

Step 1:
Unzip/Extract all files using 7-Zip
Note: If downloaded PORT ROM is SP flash tool flashable and not recovery flashable then extract system.img using ext2explore or dsixda's Android Kitchen.
Rename stock ROM (original rom of your phone) as STOCK and port rom (which you want to port) as PORT

Step 2:
a) Open STOCK and PORT ROMs in separate windows as shown below
b) Delete META-INF and boot.img from PORT
c) Copy META-INF and boot.img from STOCK
d) Paste META-INF and boot.img in PORT

Step 3:a) Open folder system/bin in STOCK and copy files pq and vold (use ctrl key to select multiple files)b) Open folder system/bin in PORT and paste pq and vold (Select Copy and Replace for both files)

Step 4:a) open folder system/etc in PORT and delete folders bluetooth, firmware, mddb and wifib) open folder system/etc in STOCK and copy folders bluetooth, firmware, mddb and wifi c) open folder system/etc in PORT and paste folders bluetooth, firmware, mddb and wifi

Step 5: a) open folder system/lib in PORT and delete folder egl and hw, modulesb) open folder system/lib in STOCK and copy folder egl and hw, modulesc) open folder system/lib in PORT and paste folder egl and hw, modules

Step 6:a) open folder system/lib in STOCK and copy all files which starts with libaudiob) open folder system/lib in PORT and paste all libaudio files

Step 7:
a) open folder system/lib in STOCK and copy following files:
libcamalgo.so libcamdrv.so libcameracustom.so libdpframework.so libsensorservice.so libsync.so libvcodecdrv.so libMALI.SO
open folder system/lib in PORT and paste all files

Step 9:
a) open folder system in PORT and delete folder vendorb) open folder system in STOCK and copy folder vendorc) open folder system in PORT and paste folder vendor

Step 10:
Open build.prop in PORT and search line ro.sf.hwrotation=
If value is 0 then change it to 180 as MMX A106, Myphone Agua Rio Lite, Wiko Bloom have flipped screen.For Starmobile UP Mini ro.sf.hwrotation=0
In build.prop search linesro.product.locale.language=ro.product.locale.region=
For English change it to
-------> For MIUI, LEWA, OPPO
Use Boot.img repack/Unpack Search google
-Unpack Both boot.img-Copy init.rc and Ramdisk File from PORTED BOOT.img -PAste it TO Stock boot.img-Repack

Step 11:
Compress all files paste to yur SD card and flash using any custom recovery.
First boot may take 2-3 minutes
- See more at: http://www.micromaxunite2.net/…/how-to-port-kitkat-roms-fro…

Now after this if ROM doesn't boot then time to patch boot.img by using boot/recovery unpack option from tool.After unpacking both stock and port boot.img copy "kernel" and "kernel_header" from stock and paste and replace with port and pack the imageNow use this boot.img in ported ROM
Fixing Bugs (If you don't see your bug here go up and try to find it in Xterme ORNOB's Guide)
Replace following files(from stock to port):

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.imgcompare 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 CAMERAReplace libfeatureio.so from /lib
FOR FM PROBLEMReplace from /lib/module folder mtk_fm_drv.ko
TO FIX GPSReplace from/lib/module folder mtk_stp_gps.ko
TO FIX COMPASSReplace libsensorservice.so from /lib
TO FIX VIDEO SHOWING PIXELS AND GLITCHESReplace libvcodecdrv.so from /lib
SHOWING WRONG RAM INFO IN TASK MANAGERDon'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 SWITCHOpen Dialer and type *#*#4636#*#*If a Pop Up appears go to Phone Information and choose your preferred network type.

PROBLEM DOWNLOADING EPOReplace in framework foldermediatek-common.jarmediatek-framework.jÂarmediatek-op.jarmediatek-telephony-cÂommon.jar

ANY RESOLUTION PROBLEMAdd this line to build.propro.sf.lcd_density=your phone screen dpiex- ro.sf.lcd_density=4800 for FHD devices

SOME KEYS NOT WORKINGReplace 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 CLONESReplace libsync.so from /system/lib folder.
WIFI TETHERING PROBLEMReplace dnsmasq from /bin folder.

SCREEN IS UPSIDE DOWNIn build.prop find this linero.sf.hwrotation=0change the value 0 to 180.ro.sf.hwrotation=180

Problem with Proximity SensorReplace nvram.so, nvram_platform.so, nvram_daemon_callbacÂk.so
SD Card not mounting or not working the framework-res.apk of your port, replace /res/xml/storage_list.xml from stock one.

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

FOR WIFI TOGGLE PROBLEMReplace wide-dhcpv6, wifi in /etc folder
ROM still not booting? Get logcat.txt from current device state using ADB menu commands in tool and share with me on thread! I will try my best to help!

I took a lot of pain and effort in making this tool and these guides please don't just leech them. Download and hit thanks in the thread rather than saying thanks.
Credits to the author on this tutorial

Similar threads

Latest posts

Top Bottom