NOW EVERYONE
BECOME A PORTER.
I CAN'T WRITE A
MORE SIMPLEST
TUTORIAL THAN
THIS.
HAPPY PORTING!!!
Requirements:Notepad++
7zip
Stock ROM (Original Firmware of your device
or the rom your mobile is currently running)
(If you don't have then gooogle search and
download)
Port Rom (MIUI ROM you want to port to
your device) (Some suggested roms are
mentioned below)
Android kitchen (Optional)
My stock rom files are in *.img format. How
to extract it?
How to choose a miui rom for porting?
Check the miui rom you choose is similar to
your
Chipset (If your device is MT6589 choose an
miui rom of a same MT6589 device)
Display (If your device is QHD choose a QHD,
if your device is HD choose QHD or HD, if
FHD choose QHD, HD or FHD MIUI ROM)
Suggesstion for port rom selection
MT6589 QHD (540 x 960) or small screen
device - use this rom
MT6589 HD (720p) screen - use this rom
MT6589 FHD (1080p) screen - use this rom
MT6582 - Use this
MT6592 - use this rom
Choose a rom which is updataed regularly.
After successful porting,
if you need weekly ota
updates you can
contact me. (MT6582/
MT6589 HD Only)
Copy/replace the
necessary files from
Stock rom to port
ROM
open stock ROM and port rom in separate
window. Delete if the miui rom contains any
uboot.img or recovery.img files.
Delete the folder "firmware" folder from port
ROM \system\etc" & Copy "firmware"
folderfrom " Stock\system\etc" to "port ROM
\system\etc"
Copy all files from "\system\lib\HW" and
replace to "port ROM\system\lib\HW"
Replace libcamalgo.so and
libcameracustom.so files from" \system\lib\"
and replace to " port ROM \system\lib\"
Replace mtk_stp_wmt.ko file from "Stock
\system\lib\modules" and replace to "port
rom\system\lib\modules"
Replace boot.img from stock to port.
Change necessary lines
from updater-script
and build.prop
In updater-script
Open updater-script using notepad++ from
"port ROM \META-INF\com\google\android"
Remove whole lines contain assert word at the
beginning of the file like this line
assert(getprop("ro.product.device") ==
"cancro" || getprop("ro.build.product") ==
"cancro");
Verify /system should be mounted in "/dev/
block/mmcblk0pS" & /data should be
mounted in "/dev/block/mmcblk0pD"
What is S and D?
S – System Mount Point
D – Data Mount Point
To know these mount point values
- Open MTK Droid Tool after connecting your
phone to PC.
- Open Block Maps.
- Check these lines.
Change accordingly these lines in updater-
script
format("ext4", "EMMC","/dev/block/
mmcblk0p5", "0");
mount("ext4", "EMMC","/dev/block/
mmcblk0p5", "/system");
mount("ext4", "EMMC","/dev/block/
mmcblk0p7", "/data");
In build.prop
buid.prop (founder under /system folder) you
can left it as it is or if you can compare with
STOCK ROM change below mentioned lines
ro.product.model=
ro.product.brand=
ro.product.name=
ro.product.board=
ro.product.locale.language=en
ro.product.locale.region=US
FLASHABLE ROM ZIP
MAKING:
Select “Data (If present), META-INF, System
folders and boot.img”
Right Click and 7Zip- > add to Archive ->
Select zip and compression Method “Store”
Make a zip and Flash it.
DONE !!!
OPTIONAL STEP: (If
phone is in bootloop/
camera problem)
Install Andriod Kitchen to your windows/Linux
Refer :- ( http://forum.xda-developers.com/
showthread.php?t=633246 )
- Rename port rom as WORKING_somename
(important) and place it in Android-Kitchen
folder.
Run Android Kitchen and
1, select "0" and "12" and "w" [it will extract
boot.img from port ROM to Kitchen\BOOT-
EXTRACTED ]
2, Now select "a" and then copy the boot.img
from "stock rom" to"Kitchen
\bootimg_mmddyy_hhmmss"
3, copy zimage from "Android Kitchen
\bootimg_mmddyy_hhmmss" & paste to
"AndroidKitchen\BOOT-EXTRACTED"
4, compare the init.rc file inside extracted
boot.img and find (ctrl+F)“cam”. Copy and
replace lines related to camera from stock
boot.img to port ROM boot.img.
5, now select "b" option in andriod kitchen [it
will build boot.img from BOOT-EXTRACTED in
to WORKING folder]
6, Then zip the whole and flash.
BUG FIXING
After you able to boot into MIUI, you have to
check for bugs. Here is few most encountered
bugs after porting and their solutions.
(If you get any more bugs and solutions please
let me know. I will add them here. It will be
helpful for all.)
1. FOR NETWORK RELATED ISSUES (3G)
Replace from /etc folder, mddb then replace
agps_profiles_conf, apns-conf,epo_conf, spn-
conf, virtual-spn-conf-by-efpnn, virtual-spn-
conf-by-efspn, virtual-spn-conf-by-imsi
2. FOR WIFI TOGGLE PROBLEM
Replace wide-dhcpv6, wifi in /etc folder
3. FOR INTERNAL / EXTERNAL MEMORY NOT
MOUNT PROBLEM
Replace vold.fstab from /etc folder
4. FOR HIGH AUDIO VOLUME ISSUE
Replace libcustom_nvram.sofrom /lib
5. FOR CAMERA NOT CONNECTED ISSUE /
CAMERA GREEN / CAMERA FORCE CLOSE
"unfortunately camera has stopped"
Replace first libcamdrv.so (needed for 6582
devices) and check if not success then replace
libcameraservice.so from/lib. If still not
success 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.
6. FOR AUDIO NOT COMING IN LOUDSPEAKER
MODE
Replace libaudio.primary.default.sofrom /lib
If still sound related problem:
Replace all libaud*.so
Sometimes replacing all audio files give you a
boot loop in that case replace only
libaudio.a2dp.default.so
libaudio.primary.default.so
libaudiocompensationfilter.so
libaudiocustparam.so
libaudiosetting.so
libaudioutils.so
7. FOR FLASH LIGHT NOT COMING FROM
CAMERA
Replace libfeatureio.so from /lib
8. FOR FM PROBLEM
Replace from /lib/module folder
mtk_fm_drv.ko
9. TO FIX GPS
Replace from/lib/module folder
mtk_stp_gps.ko
10. TO FIX COMPASS
Replace libsensorservice.so from /lib
11. TO FIX VIDEO SHOWING PIXELS AND
GLITCHES
Replace libvcodecdrv.so from /lib
12. SHOWING WRONG RAM INFO IN TASK
MANAGER
Don't change ro.product.device value in the
build.prop.
13. FOR GREEN CAMERA/ LAG / NO
WALLPAPER / NO STATUS BAR (IMPORTANT
FILE FOR MT6582)
Replace libdpframework.so from lib folder
14. 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.
15. PROBLEM DOWNLOADING EPO
Replace in framework folder
mediatek-common.jar
mediatek-framework.jar
mediatek-op.jar
mediatek-telephony-common.jar
16. 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
17. SOME KEYS NOT WORKING
Replace keylayout folder under /usr. If still
not work then replace the whole /usr folder.
18. 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.
19. BOOTLOOP ON HDC CLONES
Replace libsync.so from /system/lib folder.
20. WIFI TETHERING PROBLEM
Replace dnsmasq from /bin folder.
21. SCREEN IS UPSIDE DOWN
In build.prop find this line
ro.sf.hwrotation=0
change the value 0 to 180.
ro.sf.hwrotation=180
HOW TO CREATE OTA
UPDATE FOR YOUR
PORTED ROM.
Reply on this thread if
you successful.
It will be a motivation
for new comers.
Guest Please reply to view this thread.
Tags: port miui, miui porting, tutorial, guide,
simple tutorial, port to mtk, device,
MTK6589, MTK6582, MTK6592, MTK6577,
android kitchen, kitchen, xiaomi, port, miui,
FHD, QHD, ROM, custom rom, full rom, ota,
update, weekly ota
Keywords: port miui, miui porting, tutorial,
guide, simple tutorial, port to mtk, device,
MTK6589, MTK6582, MTK6592, MTK6577,
android kitchen, kitchen, xiaomi, port, miui,
FHD, QHD, ROM, custom rom, full rom, ota,
update, weekly ota
Labels: port miui, miui porting, tutorial,
guide, simple tutorial, port to mtk, device,
MTK6589, MTK6582, MTK6592, MTK6577,
android kitchen, kitchen, xiaomi, port, miui,
FHD, QHD, ROM, custom rom, full rom, ota,
update, weekly ota
Index: port miui, miui porting, tutorial, guide,
simple tutorial, port to mtk, device,
MTK6589, MTK6582,