This Guide is also applicable in porting other ROMs like Color OS, Flyme OS, Sense and more... and this guide has been updated for MIUI 10 as well.
ROM porting is not an easy task for a newbie and porting a highly customizable ROM like MIUI is a way tougher. When I was porting MIUI v7 Lollipop for a Qualcomm Snapdragon device I did not find a definitive guide for porting the latest MIUI versions. So, porting MIUI became a very tough task since I was a newbie in porting ROMs. I learnt porting through experience. Then I also ported MIUI 8, MIUI 9 and MIUI 10. Hence I am writing this guide to help the new MIUI porters so that they don’t face the problems which I faced.
Not much history now, let’s move on to our actual task i.e. how to port MIUI ROMs (Updated for latest MIUI 10 as well)
DISCLAIMER: This guide is written to help the emerging devs. Soft bricking is common in porting ROMs. But, I am not responsible if you somehow hard-brick your device. Do it at your own risk.
Prerequisites
Things required for porting:- Device for which the ROM is being ported
- Port ROM i.e. the ROM of other device which you want to port (here we have MIUI 7)
- Base ROM i.e. the Rom which is exclusively made for your device (CyanogenMod is preferable but if it is not available then Stock ROM may be used)
- PC with Windows + Ubuntu (either in dual boot or through Virtualbox)
- Rom Deodexer (optional) [for Winidows - TOAD or Unified Deodexer and for Linux - SuperR's Kitchen (recommended)] [For Android 6.0 Marshmallow ROMs use this tool to deodex: SuperR's Kitchen]
- Android Image Kitchen to modify boot.img
- Notepad++ to edit scripts
- Meld to compare files and folders
- Winrar or 7zip
- Apktool (for advanced tasks only)
- And some common sense
Common Information
- This guide will teach you to port ROMs from devices with similar hardware specs and same Qualcomm Snapdragon chipset.
- The Port ROM and the Base ROM should have the same android version.
- ROMs containing DAT files should be properly unpacked. For base ROM you can easily do it by flashing the ROM and taking the TWRP backup of ‘system’ and extracting the resultant file with Winrar/7zip. For Port ROM follow this guide: [DEV] Lollipop/Marshmallow DAT files or you can use SuperR's Kitchen for the same.
- ROMs should be properly deodexed before porting (SuperR's Kitchen worked better in deodexing MIUI 7 Lollipop) if your device's /system partition size is smaller than Port ROMs system files. (deprecated because deodexed official firmware no longer boots) OR Download unoffical MIUI builds from (recommended):
- The size of the system folder of your Port ROM should be lesser than that of the system partition of your device, else you'll not be able to flash the ROM. To decrease the size you need to deodex your ROM and you may further need to debloat you Port ROM which is discussed later.
- I am writing this guide on the basis of this configuration:
- Base device: YU Yureka (ARM64)(MSM8939)
- Base ROM: CyanogenMod 12.0
- Android Version: 5.0.2 Lollipop
- Port device: MI4i (ARM64)(MSM8939)
- Port ROM: MIUI v7 Lollipop (but the guide works for MIUI v8, v9 and v10 as well)
Preparing Porting Environment
- Make sure you have plenty of hard-disk space in your PC.
- Make a folder named MIUI-PORTING-PROJECT (you may take any other name)
- Inside that folder create two folders: (i) BOOT-EDITING (ii) ROM-PORTING
- In ROM-PORTING folder create two folders named BASE and PORT (this is the main working folder)
- Similarly inside the BOOT-EDITING folder create two folders named BOOT-BASE and BOOT-PORT
- Now place the extracted deodexed Port ROM (i.e. MIUI v7) in PORT folder and Base ROM (i.e. CM 12.0) in BASE folder.
- Similarly place the MIUI boot.img in BOOT-PORT folder and CM12(or LOS 13/14/15/16 as per requirement) boot.img in BOOT-BASE folder.
Cleaning up:
Just delete some unwanted files (like .mbn files) and keep only ‘META-INF’ folder, ‘data’ folder (if available), ‘system’ folder, ‘boot.img’ file and ‘file_contexts’ file (if available) in PORT folder.
Now let’s do some work to make the Port ROM boot.
META-INF editing
- Open the updater-script file in PORT/META-INF/com/google/android/ with Notepad++.
- Delete the first line containing “get_device_compatible(….” or “assert(getprop….” which restricts the flashing process to other devices.
- Then delete the lines containing scripts for flashing radio image, modem image etc. which are not required for our base device.
boot.img editing
1. Use Android Image Kitchen to unpack the base and port boot.img in BOOT-BASE and BOOT-PORT folder.2. Replace the files boot.img-zImage, boot.img-dtb in BOOT-PORT/split_img/ with that of BOOT-BASE/split_img.
Replacing boot.img files |
Editing fstab.qcom using Meld: Step 1 |
Editing fstab.qcom using Meld: Step 2 |
After this repack your boot.img and place it in your port ROM folder (i.e. PORT) and create a flashable zip. You will be able to boot this time. But, you may face sensors, sound, camera, ext sd-card etc. issues. So let us move on to fix those issues through boot.img first.
4. If the port device doesn’t support external sd-card but your base device does then you make the following changes to your BOOT-PORT/ramdisk/init.qcom.rc file:
Remove ‘#’ from the lines containing scripts for mounting or fusing ‘sdcard1’. You can do this simply by comparing the port init.qcom.rc with that of base through Meld application. (Note: You may also need to add some lines if missing in the port init.qcom.rc)
5. After sd-card, let’s move towards fixing camera, led, sensors etc. issues. For that we need to edit the init.rc and init.target.rc files.
=> Editing init.rc file:
Following lines should be added to init.rc file:
#Add all these lines under 'on post-fs-data' in appropriate places
on post-fs-data
#Add all these lines under 'on boot' in appropriate places
on boot
=> Editing init.target.rc file:
Following lines should be added to init.target.rc file:
#Add all these lines under 'on post-fs-data' in appropriate places
on post-fs-data
#Add all these lines under 'on boot' in appropriate places
on boot
6. Even after doing the above steps you may find that sensors are not working. So for that you have to do the following step –
Compare the port ueventd.qcom.rc in BOOT-PORT/ramdisk folder with that of base and add the missing lines to the port. This will fix your sensors issue.
7. Similarly compare other BOOT-PORT files like uneventd.rc, file_contexts etc. with that of BOOT-BASE and use your brain to replace required lines.
8. To fix other issues use your common sense.
9. If you are doing boot.img editing at the beginning of your project, then some of you may find that even after doing all these steps, sensors, led, camera etc. are not working. But don’t lose heart, for that you have to start your ROM Porting.
ROM Porting
Before starting ROM porting, your base and port ROM should have all the files in place. If you have correctly edited the boot.img then the following steps will help you to solve your bugs.1. Debloating Port ROM: Just delete unwanted apps or bloatwares from your port ROM. You will find them in /data/, /system/app/ and /system/priv-app/ folders.
2. According to my previous instructions you should have placed your port ROM to PORT folder and base ROM to BASE folder.
3. Adding missing files and folders: You may add missing files from BASE/system/bin/ to PORT/system/bin/. For this you can just copy all the files from BASE/system/bin/ to your PORT/system/bin/ without replacing any file.
Similarly you can do the same process in system/xbin/, system/fonts/, system/etc/, system/usr/ etc. and their sub-folders.
But always use your brain to decide which files you should add and which you should not.
You may also add some missing folders from your base ROM to your port ROM, e.g. system/tts folder, system/etc/init.d if you think it's needed.
4. Fixing permission related issues: Now you have to work on system/etc/permissions folder. Just compare handheld_core_hardware.xml and platform.xml of port ROM with that of base and add or replace some lines if required.
You can do the same for some other permission files if required, but as I am always saying use your common sense.
5. Replacing files: Copy and replace files in system/etc/firmware and in system/etc/wifi from base to port.
Copy and replace the files goodix.kl (name can be different for different devices), gpio-keys.kl, Generic.kl in system/usr/keylayout/ from base to port.
We will discuss more about replacing files in bug-fixing section.
6. Open system/framework/framework-res.apk of both base and port with Winrar in two different windows but don’t extract. Then navigate to framework-res.apk/res/xml/ of base and copy storage_list.xml and power_profile (optional) and paste to the Winrar window of port framework-res.apk/res/xml/ and replace the existing files. Then close the Winrar window.
Now let’s move on to our bug-fixing section.
Bug-Fixing
If you have properly edited the boot.img then only these fixes will help you.Copy and replace the following files from Base (ROM-PORTING/BASE) to Port (ROM-PORTING/PORT) to solve the given issues:
No sound bug:
system/lib/hw/
- audio.primary.msm****.so
- audio.primary.default.so
- audio.primary.msm****.so
- audio.primary.default.so
(You may also check system/etc/mixer_paths.xml and system/etc/acdbdata folder)
Sound working in speaker but not working through headphones or vice-versa:
system/etc/- mixer_paths.xml (you can also try patching it with the base)
Distorted Outgoing Sound during Phone call or Partial Sound:
system/etc/acdbdata/MTP/
- MTP_***.acdb (all files)
Home or any other button not working:
system/usr/keylayout/
- goodix.kl
- gpio-keys.kl (important)
- Generik.kl
External sd-card not showing:
Follow the Step 6 in ROM Porting section.
Video hw encoding/decoding not working:
system/etc/firmware/
- venus.*** (all files starting with ‘venus’)
- system/lib/hw/sensors.msm****.so (or sensors.lsm6db0.so)
- system/lib64/hw/sensors.msm****.so (or sensors.lsm6db0.so)
- system/lib/libsensorservice.so
- system/lib64/libsensorservice.so
- system/vendor/etc/calmodule.cfg
- system/vendor/lib/libcalmodule_****.so
- system/vendor/lib64/libcalmodule_****.so
Led notification not working:
- system/lib/hw/lights.msm****.so
- system/lib64/hw/lights.msm****.so
Vibration not working:
- system/lib/libhardware_legacy.so
- system/lib64/libhardware_legacy.so
FM not working:
- system/lib/qcomfm_jni.so
- system/lib64/qcomfm_jni.so
Wifi not working:
- system/lib/modules/wlan.ko
In some phones (e.g. YU Yuphoria) you may not find wlan.ko file. In that case you may try replacing these files (thanks @Divyansh747):
- system/lib/libwcnss_qmi.so
- system/lib64/libwcnss_qmi.so
And also these files (thanks @D Rohan):
- system/lib/libhardware_legacy.so
- system/lib64/libhardware_legacy.so
For slow WiFi network and other WiFi related issues replace these files:
- system/etc/wifi/ -- all files
- system/etc/firmware/wlan/ -- all files
Camera and flash not working:
system/vendor/lib/
- libactuator_***.so (all files starting with ‘libactuator’)
- libchromatix_***.so (all files starting with ‘libchromatix’)
- libmmcamera_***.so (all files starting with ‘libmmcamera’)
- liboemcamera.so
system/lib/
- libmm-qcamera.so
- libmmcamera_interface.co
system/lib/hw/
- camera.msm****.so
WARNING: Do not replace any file unnecessarily, because it may give rise to new bugs in place of solving it. Always be specific!
build.prop Editing
You can edit required parts of build.prop to reflect the brand, model no. etc. according to your preference. You may also add some tweaks and other things to save battery and to add features.(But in MIUI according to my experience changing the ro.product.manufacturer gives rise to issue in video recording through third-party apps and changing the ro.product.device trims some features from the ROM. However, you can get through this by reverse engineering the respective apps using Apktool.)
Now your Porting Project is ready to be flashed and to be reviewed. Congrats!
Giving Credits
Last but not least when you successfully port your ROM, always give credits to the Port and Base Rom developers. Also give credits to the people from whom you took help. Always be generous in giving credits because it will not take anything from you, on the other hand it will increase your reputation and strengthen people’s faith in your work.If you are taking help from this guide in your ROM Porting then don't forget to give some credit to me too.
My profile
XDA Forums: nitesh9MIUI Forums: nitesh9
My works
MIUI v7 Lollipop Global and China Beta for YU Yureka: XDA Forums | MIUI ForumsMIUI 8 Global and China Beta ROM for Yureka and Yureka Plus: OS Busters | XDA Forums
For any queries or discussion please comment below...
hi i'm AlekDev -developer i want to port to Alcatel idol 3 on Android 6.0.1...Can i try to port from your miui8 from Yureka?
ReplyDeleteYeah you can try. Don't forget the credits and source. :p
Deletei need your help I'm trying to port color os 2.1 to xiaomi mi4 device but dont boot only it stays in bootanimation can you helpme please. I use a cover rom from one plus x
ReplyDeleteYes.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHi nitesh.
ReplyDeleteVery nice tutorial.
Thanks for this.
I am oneplus 3 user, we already have working chinese port.
can we that as base as shortcut ?
if yes, then what should I need to do ?
just replacing apps will do trick ?
Yes you can use that as base but don't forget to give proper credits. Try replacing files from base to port. You can use the boot.img of the Chinese MIUI which most important to boot the ROM.
DeleteI have been under way in this little port ROM boot through it, but if it freezes its boot ROM 5.1.1 ROM based as it is, I have to ROM 5.0.2 or guide you through it, thank you.
DeleteHi Nitesh
ReplyDeleteI am trying to port oppo neo 5s 1206 KitKat rom to coolpad dazen8297L-i00.on first try ...deodexed rom then after edit all changes ..showing only oppo animation logo...then tryed to original odexed rom it boots ok but at setup screen it showing status bar is stoped..settings stoped..at not proceeding next.
Why is it happening ...i have already ported miui7 and colour os from mirror3...but this rom is having issue...
And need your help
Thanks
Do you know any device similar to Xperia M? I. can't find any :(
ReplyDeleteis it possibile port Miui 8 to Samsung s5 ?
ReplyDeleteBro how to fix bugs of heating, battery draining, multi touch issue, & performance lagging issue in ported miui v8 rom
ReplyDeletei want to port miui 64bit lollipop rom to yuphoria so what to choose
ReplyDeleteHow to port MIUI 8 rom for SC-04E as I am planning of making one ? It will be a lot useful if you give me further steps to do it.
ReplyDeleteYou said "#Add all these lines under 'on post-fs-data' in appropriate places
ReplyDeleteon post-fs-data", but what places are the appropriate?
Sorry, firt rom port try :p
I am ported Miui8 for Lgg2 but stuck in bootanimation. Adb doesn't see my phone what's problem?
ReplyDeleteHello bro just boot.img init.rc properly editing to solve the boot animation problem
DeleteGetting stuck at boot
ReplyDeletehttp://pastebin.com/Q8SxXGsN
Can't boot.
ReplyDeleteNexus 6P
http://pastebin.com/Q8SxXGsN
There is no device which has the same chipset of oneplus one supporting complete version of MIUI. Is it possible for me to port miui 7 for oneplus one. Via patchrom method already we can port for KitKat 4.4.4 But I want to try for marshmallow.
ReplyDeleteDude, thank you. I finally have the info and I fixed the video recording bug on my rom for the Mi Max. Thanks again.
ReplyDeleteHi nitin prasad can u help me porting from mi4 to zuk but stuck at bootlogo not working pls help bro
ReplyDeleteI am trying to port miui 8 from Mi Max(snapdragon 652 and marshmallow) to le Eco le 2 (Snapdragon 652 and marshmallow).....Will this guide work? and also even though both the phones have almost everything in common....Mi Max uses micro USB(charging) and 3.5mm jack(audio) and Le 2 uses Single type-c for all the things...........Will the port workout???
ReplyDeleteI miui v8 port, but it left me a page based on a boot ROM port 05.0.2 5.1.1 to fix it I can do it.
ReplyDeleteI miui v8 port, but it left me a page based on a boot ROM port 05.0.2 5.1.1 to fix it also has some of the ROM yu yureka port toi mobile iqx pro3 it.
ReplyDeletecan you port miui 7 stable of redmi 2 prime for coolpad dazen 1
ReplyDeleteI successfully port the MIUI 8 from Redmi 2 Prime to my Galaxy A5 (2015) using CM12.1 as base, but is fully buggy (no Wi-Fi, Bluetooth, RIL, Camera, Sensors, etc). I tried modify the kernel, but not works, causes bootloop in boot animation and i can't use adb, because my computer not recognize the device using MIUI 8. You can help me? I tried use libs from CM12.1 too, but no success.
ReplyDeletesir this method used to porting the color os from my device and poring and mobile installed sucessfull and mobile first booting color os booted and opened next color os app update will completed nex automatic mobile is restart fom all the time plz tell how to fix it
ReplyDeleteChange thermal-engine.
DeleteHi nitesh i read your post miui 8 porting i want miui 8 port for Samsung galaxy note 3 sm-n9005 please guide me how it possible and can i modfied miui 7 to miui 8 or convert miui 7 in to miui 8 ? Please guide easy method
ReplyDeleteI have miui 7 6.5.27 for galaxy note 3 sm-n9005 can i edit or modified it to miui 8 or any other procedure ?
ReplyDeleteSir this method used to porting on my coolpad and install boot all successful next open the color os first boot setting this error show(Unfortunately, the process android.process.media has stopped)how to solve
ReplyDeleteCheck for any missing symlinks. Also replace etc/firmware files.
DeleteHai nitesh I have ported on color os from my phone ported and install successful after I have camera bug fixed.after my phone color os booted but not open in color os how to solve plz tell me
ReplyDeleteBro I have color os this method used to ported my phone .I have camera bug fixed after only show on color os logo not boot up how to solve plz tell me plz.....
ReplyDeletePlz help me sir
ReplyDeleteTry replacing all camera related files.
DeleteHi nitesh,,,need help here,,,i was able and succeed to port your miui8 into my device which is sd415...but my mistake was that i use miui8 6.8.25 which is android 5.0.1 and my device got 5.1.1
ReplyDeleteAs you say i might get ril problem..yes right...even i flash via qfil my signal still wont show up even the device recognice the ruim card...
So i need help how can i fix it???
Really need help here
Replace system/etc/firmware/ files from a working ROM.
Deleteis there any way that you can port a rom for my device(knight2)
ReplyDeleteSir i will camera bug fixed not it open os starting file but booted how to solve
ReplyDeleteAre you willing to help port MIUI 8 for MiMAX Pro(Hellium) to LE 2 x526 I tried but stuck on Android's stock bootanumation. adb is not initializing so donot really know what is going on.
ReplyDeleteI think wifi data can be fixed through wifi modules as suggested above. For data if your sim is detected check build.prop for lines "ro.telephony..." and replace that with your base.
ReplyDeleteBro this method used to port successful
ReplyDeleteBug
1)internal memory not open
2)camera not open
How to slove tell me please
Check mount points in fstab.qcom in ramdisk for internal memory. Also check storage-list.xml in framework-res.apk.
DeleteFor camera try replacing other camera related files.
Also check ramdisk for camera related lines.
Could you port a Rom for Phicomm EX780L, the stock is a chinese one and there is one ported but whatsapp dont work.
ReplyDeleteHi,
ReplyDeleteI have LG G3 Cat.6 (F460S), I want to port MIUI7 for it. Can you please recommend any device which I can use to port a ROM from?
Hi Mr. Nitesh Prasad,
ReplyDeletefirst i want say thanks for the great guide !
I try now very long to port:
BASE: sony xperia z3c cyonegenmod 13 6.0.1 MSM8974
PORT: Xiaomi MI4 MIUI 8 6.0.1 MSM8974
i checked hardware specs, and there is not big difference between ...
i tried your guide, but i am stuck at bootlogo - still "sony" not MI logo ..
is it possible to port from and to this devices ? The BaseRom CM13 is ok ?
thanks for any answer
Check fstab.qcom for any additions or ommitions. Replace etc/firmware files.
DeleteIf there is a possible way that Asus zenfone 2 laser ZE550KL will support MIUI V8??
ReplyDeleteIf you are using SD 615 version then you can port it from Mi4i.
DeleteIf you are using SD 410 version then you can port it from Wileyfox Swift or Redmi 2 Prime.
Does redmi 2 prime support VoLTE? i need a volte based rom
DeleteI don't think so. But Redmi 3 supports VoLTE.
DeleteHello nitesh I have boot.img unpacking success full and I open ramdisk. two files are in my ramdisk init.rc and init.at.rc how to I am editing this file plz tell me
ReplyDeleteYou have to edit only init.rc.
DeleteHi sir, pls tell me how to port stock camera app from coolpad dazen 1 to miui 8.
ReplyDeleteYou can port stock camera app by modding it. Search for app porting guide on XDA.
DeleteHai nitesh I have 90℅ of porting bug has solved and only two bug 1)audio or video sound 100℅ volume rised no sound coming speaker and 1℅ to reduce audio coming in speaker How to solve
ReplyDelete2)led notification not working and your bug fix already I followed but not successful
Plz tell me how to fix it
And thanks for nitesh
Check and edit system/etc/mixer-paths.xml and replace system/etc/acdbdata/ all files.
DeleteIf you are porting color os then for led notification you have to give the apps lockscreen notification permissions from Permission Manager.
DeleteAlso in Color OS 3.0 there is no led notification for charging.
I was completed above steps for porting Lenovo a6000 miui rom for Moto g3 flashing of rom is completed but after reboot stock at logo and I was checked the system folder of phone with twrp advanced file manager the system folder is empty what happened can explain me
ReplyDeleteCheck updater script, you must have missed some lines like 'package extract directory....'
DeleteI was checked whole script package extract directory at system folder and compared with origin script both are identical and I was replace file content to port with out editing how to solve this
DeleteCan I use this guide for porting TouchWiz ROM
ReplyDeleteYeah you can use. It may help you to some extent.
DeleteNitesh only media volume is 100℅ increased sound not coming on speaker
ReplyDeleteBut 1℅ reduced sound is coming speaker worked and this method not working
You need to edit etc/mixer-paths.xml.
DeleteNitesh I have solved the problem on copy the audio related files on (etc and lib)
DeleteAnd only one bug incoming call can't show on display.and only black screen plz tell me how to fix
It's a proximity sensor bug (you can check through CPUZ app). Are other sensors working?
DeleteIf yes then add missing lines related to sensors in ramdisk/file-contexts from base to port.
Bro I am tried but not work plz any idea
DeleteAnd other sensors worked
DeleteYou need to edit the ramdisk/file-contexts file and missing lines related to proximity sensor etc. from the base file-context.
DeleteHi Nitesh, I want to port MIUI ROM for my Huawei Gr5 KII-L21.Now it has Marshmallow. Please advise me wnich version is suitable for my dream project. Waiting for your valuable response.
ReplyDeleteNo idea about that. You have to search that yourself
DeleteBro is MIUI8 patchROM available ? thanks for the great guide
ReplyDeleteNo, MIUI 8 PatchROM is not yet released.
DeleteI was copy original hoodie script from port ROM but it won't copy the system folder can I copy system folder with twrp file manager or give me suggestion for editing script
ReplyDeleteYeah, you can use TWRP file manager but don't forget to give correct permission.
Deleteim allways in bootloop. used as based Mooke rom / stock rom
ReplyDeleteany idea? can't get logcat. i also pm u on xda
Edit ramdisk/default.prop => ro.debuggable=1
DeleteThen you'll be able to logcat.
This is Logcat ( Last_kmsg)
Deletehttp://pastebin.com/0STXgCxw
Logcat is about 3.3mb,
http://forum.xda-developers.com/showpost.php?p=69074776&postcount=1200
here is link
HI
ReplyDeleteI HAVE DOWNLOADED XOLO LT2000 4G FIRMWARE, FOR PORTING TO MSM8916
BUT
THE FIRMWARE CONTAINS MULTIPLE SYSTEM.IMG FILES .
HOW TO MERGE THEM IN SINGLE SYSTEM.IMG
PLS NEED HELP
Use only the system.img file.
Deleteis there any MIUI with android 4.1.2 and MSM8625 (Snapdragon S4 Play) for my Galaxy Infinite i759? i have been searched but i've found a MIUI port from another device which have a same chipset to my device, but not a MI devices. can i port from that rom?
ReplyDeleteI have been trying to port MIUI to the nexus 6P. It freezes at the MI boot logo during boot though.
ReplyDeleteTry editing fstab.qcom correctly. Also try replacing etc/firmware files.
DeleteHi
ReplyDeletei have downloaded xolo LT2000 4g stock rom
but it contains
system_1.img
system_2.img
to
system_28.img
HOW TO MERGE THEM
AND IS IT POSSIBLE TO PORT LOLLIPOP TO CP dazen1[KITKAT DEVICE]
Can I port HTC desire 820 5.1.1 os to yureka with cm12.1 as base.??
ReplyDeleteI tried to starting port Samsung a7 ROM to yureka,but there is no meta info folder in it.
Hii Nitesh,
ReplyDeleteI am trying to Port MIUI V8 5.0.2 from Mi2 for LG Optimus G F180, using AOSP 5.0 as a base rom. The problem is when flash tte zip file using Phil Touch it get stucks on Installing Update and nothing happens after that.
Always use latest TWRP Recovery. Check updater script for errors.
DeleteSir , Phicomm Passion 660 also houses Snapdragon's (ARM64)(MSM8939) like YU Yureka+ and MI4i device.
ReplyDeleteAnd I also managed to grab the Stock ROM , That the OEM shipped with the phone from their factory .
Can I follow your instructions to port MIUI or other ROMs that You ported to YU+ ?
I am not hoping 100% success at the very first attempt ?
Just seeking an expert's advice before doing anything stupid or messing up the device .
Though The Stock from OEM is Android 4.4.4 and the device has some extra thing like Pedometer and a few more that I never needed .
ReplyDeleteYou need an Android 5.0.2 based stock ROM. Since MIUI 7/8 for Mi4i is based on Android 5.0.2.
DeleteAnd yes you may follow this guide to port ROMs to your device.
Hi NITESH,
ReplyDeleteActually i am waiting for your suggesion and information for tool to solve issue,
I HAVE A SOME KITKAT ROM FOR PORT TO COOLPAD DAZEN1 8297L-I00.
HTC ROM CONTAINS MULTIPLE SYSTEM.IMG FILES ,
FROM SYSTEM_1.IMG
SYSTEM_2
SYSTEM_3
TO SYSTEM_28.IMG
HOW TO MERGE THEM IN SINGLE FILE
IS ANY TOOL AVAILABLE FOR IT
I HAVE ALREADY TRYED SPARSECONVERTER AND SPARSE FILE JOINER, BUT NO ONE WORKS.
AND ON MORE THING IS THAT,
IS IT POSIBLE TO PORT MIUI OF REDMI2 PRIME LOLLIPOP
TO CP8297L-I00
PLEASE, WAITING FOR ANY AVAILABLE TRICK
Hello Nitesh, i want to try porting rom to my htc one mini 2, which port rom can I use if base rom would be CM 13. I'm having hard time finding a device form which i could port.
ReplyDeleteCan I port z3 compact it use same processor mi4
ReplyDeleteDID EVERYTHING AS SAID BUT GETTING STUCK ON MI LOGO
ReplyDeleteI DID EDITED MY BOOT.IMG AND EXCHANGED FIRMWARE ETC
NO LUCK
THEN
I ALSO EXCHANGED LIB ART FILES AS SAID BUT NO LUCK :(
HELP IS APPRECIATED
I'm porting miui v7 lollipop(mi4i) to xperia m4 aqua but i have a big bug, SIM CARD don't detect ¿Any solution?
ReplyDeleteI tried v8 MIUI port of cm13 lg nexus 5 for D838. But I always fail "Erro boot ...". Can you help me build boot.img?
ReplyDeleteI tried v8 MIUI port of cm13 lg nexus 5 for D838. But I always fail "Erro boot ...". Can you help me build boot.img?
ReplyDeleteThe MIUI8 build when flashing in TWRP on my M8 just keeps on flashing and nothing happens. Please help?
ReplyDeletegionee e7 miui 8 is it possible???????????????/
ReplyDeletethanks for reply... can i send u my updater script? and my versions of both roms are OKAY? I have sent u message on mi forums.
ReplyDeleteNo...no time for that.
DeleteHello, porting on your instructions (Snapdragon 810) Base cm 12.1 (Letv x800 US), port Miui 8 (Mi Note Pro) (Android 5.1.1). The system boots normally, but unusable :) - problems:
ReplyDelete1. Do not defined any one sensor;
2. There is no sound;
3. No wi fi;
4. Brightness adjustment is not;
5.Do not work the menu button;
6. If you turn off the screen, it will not turn on, just restart (the system while running - check mtp);
7. Do not operate the camera;
8. If you go to settings - application fails.
The ramdisk specific differences were found in the sensors, replacing / adding additional bin, lib lead to bootloop.
Any ideas :)? Thank you...
Follow the Bug-Fixing section in the guide above.
DeleteThanks for the answer. Not the first time porting. Instructions from sections Fix fulfilled, libs from the database changed - there is no result. It seems that the need to change and libs and bins in the port, as well as add instructions for them in the ramdisk, but in this case, get bootloop ...
DeleteIf you have already replaced the libs in system folder then you have to edit the ramdisk files like init.rc, ueventd.rc etc.
DeleteAnd you have to add lines in your ramdisk/file-contexts file from base.
small difficulty is, I think, that is officially on my phone only Android 5.0.2 rom, CM 12.1 - which I use as a base, someone ported to my phone, and a set of rows with respect to devices in these two boots (stock and CM12.1) in them is different, use as a basis for the devices (individually - not together, even together) to the desired result does not. "ooh and difficult - this work - to drag out of the swamp behemoth" :)
ReplyDeleteThank you very much for your reply.
There is an MIUI 8 build for exynos version of my Note 4 here: http://forum.xda-developers.com/showpost.php?p=69122018&postcount=888 . Could I port this to my n910f using your guide, or is the difference in chipset a problem?
ReplyDeleteDifferent chipset may create problems.
DeleteFor old device ? Please recommended for My device galaxy young gt-s6310
ReplyDeleteSorry i'm bad English, i'm from Indonesia
1. Problems with buttons (and the inclusion of the screen and brightness adjustment) - decided corrections in the files (that are not in the database) in keylayout folder; 2. I saw the front camera phone, though it does not start (did not notice that :); 3. telfeon saw, but did not work the proximity sensor - renamed lib from the database, since the database was not like this; 4. appeared sound, but only with headphones (straightening and replacement of mixer-path no result About the Wi-Fi -. Libs replacing, renaming them the result is not given, there is no mac-adress, noticed that the port Boot string relative to the start mac -adress commented out, whether to activate them? Where can I find the values of the backlight (brightness is lower than the drain)?
ReplyDeleteThanks.
can samsung j5/a3 be port to lenovo a6010 plus with this guide?
ReplyDeleteI was ported ROM for mt6753 from Lenovo k4 note using this guide. it was booted but always saying unfortunately com.phone was stopped how to fix help and sound not working
ReplyDeleteTry replacing etc/firmware/ files and also try replacing RIL libs for the Dialer FC issue.
DeleteFor sound replace sound related libs as directed in the above Post. If doesn't fix then replace etc/ mixer-paths.xml and acdbdata files.
Mixer-paths.xml is not available in both roms
ReplyDeleteHello sir..i have zenfone 2laser 2gb varient..i want to port mybrom to miui 8 how can i do it sir??0please help mee
ReplyDeletecan i port miui 7 for samsung grand prime
ReplyDeletecan i port this rom on Broadcom BC28155 device ?
ReplyDeletehi sir, i'm porting MIUI 8, but camera not work, it have green screen and when i play music, video, or take a picture it auto restart :( how can i fix it ????
ReplyDeleteBro difference between qualcomm sd410 msm8916 and Qualcomm sd410
ReplyDeleteNo difference.
DeleteWhat if the two devices have different display size
ReplyDeleteMine (Huawei Y550) is 240dpi, the other one (Redmi 2 Prime) is 320dpi
hello nitesh please tell me how to editing or modify the system used .so file and which softwer used to open the file
ReplyDeleteHello nitesh my mobile running is KitKat version and my mobile not upgraded lollipop version and How to port lollipop version plz tell me and it's possible
ReplyDeleteGreat tut, just 1 question
ReplyDeleteI have a Samsung Note 3 and someone ported Nougat to it using CM14.1 as a base, how is this possible since there are NO Nougat Roms as base for the note 3, i was under the impression that you can only port from Same Android sdk, Base 5 to port 5 ect so hows it possible that they can port Nougat to note 3?
Hi there. I am trying to port miuiv7, but stuck in a bootloop. replaced those 3 libs but didn't help.
ReplyDeleteAs I am porting from a different manufacturer,i.e from sony to samsung, do i need to modify framework? If yes, where can I find the guide to replace necessary files in framework?
Please let me know
Hello sir. I try to port Redmi2 TD miui8 to my Samsung J500H cm12.1 based. it was booting but lot of bugs. im trying to fix bug but i cannot start because adb didnt recognize my device. Do you know what files should i copy to make my device readable in adb?
ReplyDeleteEdit your boot.img/ramdisk/default.prop and change the line like this:
Deletero.debuggable=1
I've followed all the steps in this guide but the kernel does not boot, it's stuck in the boot logo, and it reboots the device.
ReplyDeletehey, would it be possible to port from a device with a different processor? im trying to port a miui port from the Galaxy S4(exynos) to the snapdragon variant. Thank you for your guide!
ReplyDeleteYou may try...I succeeded in porting sd410 ROM to sd615.
Deletei ported ur rom to asus ze550kl the rom installed but lastly it shows no os installed..pls help
ReplyDeleteI want to port Nubia ROM on yureka plus can u plz help in what should be my base rom
ReplyDeleteUse your device's stock ROM as base.
DeleteHello! Can I use this guide for porting MIUI on Vernee Apollo Lite? It has MTK6797 procc, not Qualcomm
ReplyDeleteHello, my device is Hisense L676, it has msm8939 and android v5.1.1. Can I port Yureka cm13 rom into my device? Sorry for bad English
ReplyDeletepermission to bookmark your post sir, will do porting miui for my device later with help of your works.
ReplyDeletethanks in advance
Sir, can i port rom ZenUI from zenfone laser 2 to my phone Redmi 3 using this guide.?
ReplyDeletehi... is it possible to port xiaomi resmi 3 rom to oppo f1f?
ReplyDeletehow i can port miui yureka to YUTOPIA Nitesh Sir Plz Help me
ReplyDeleteI choose CArbon RoM Base Rome And Port Rom IS YUREKA miui 8
This is because of different chipsets in both the devices. Cross chipset porting is very difficult and not recommended for beginners.
DeleteTry to port oneplus 2 miui ROM
DeleteLink:-https://forum.xda-developers.com/oneplus-2/development/rom-t3497034
Don't forget to take permission ;)
Good Day,
ReplyDeleteSir can I port MiUI base on Android 5.0.2 to my device Android 5.0.1 as base.?
Thank you in advance. :)
You may give it a try. It should boot, but cannot guaranty about camera to work.
DeletePlease....can you say me for Qualcomm MSM8952 Snapdragon 617 ???...what rom (devices) I need for port miui 8...help!
ReplyDeleteSir Nitesh Please help me how to port MiUI Yureka to my phone Starmobile Knight Elite.
ReplyDeleteI choose my stock ROM as base and MiUI Yureka as Port.
Help!!! :')
hi! i try to port a miui v8 4.4.4 mi note prime snapdragon 410 msm8916 to zte nx406 whit the same procesor, it is posible? i tri it, but the divice get bootlop, sorry for my bad inglis
ReplyDeleteHaving issues porting CM13 and Lineage OS for the Redmi 3s to my Blu Life One X2 (using stock rom backup from TWRP as there is no custom ROMs for my device).
ReplyDeleteI have done everything in your tutorial and the ROM does boot up and I can get to the home screen just fine. The issue I am having is fixing the bugs.. (Sim 1/2, wifi, bluetooth, no sound, video playback fails, and camera)
Attempting to repack system.new.dat files fails for me (rimg2dat has stopped - windows 10) So i attempted to use just the system folder and modified boot image. When doing this the Rom flashes properly but once booted up it says "phone has stopped, wifi has stopped" etc. even attempting to create a flashable stock ROM I get the same error (nothing is modified). What am I doing wrong? Could it be that I am failing to create an appropriate update-script (symlinks and permissions?)
Any feedback would be appreciated! Keep up the good work.
Thanks in advance
Yeah it's related to symlinks...Phone, Wifi and many other system apps like Gallery etc. require some special symlinks...
DeleteYou try extracting your system.img of the ROM using SuperR's Kitchen. It creates updater script automatically.
Hello Nitesh,
ReplyDeleteI need some help porting "Funtouch os" to HTC one m7. The Funtouch os is much better from MIUI which is very close to iPhone... Can you help me ? Let me know If you are interest...
Is this guide will work to port miui 8.2 based on android 7?
ReplyDeleteI have an Itel 1508 5.1 lolli, can I upgrade to 6.0 Marsh using a ROM from a device with same sc7731 chip? I really need to switch to either 5.1.1 or 6.0 in order to fix the memory leak issue on some 5.1 devices
ReplyDeleteI want port rom miui 8 for ASUS Zenfone 2 Laser ZEE500KG
ReplyDeleteHi, can you port miui 8 for moto x play
ReplyDeleteTried so many times but keeps failing its been 3 days not even a single successful flash. Nitesh do u have any Skype or Email where i can directly contact you for my MOTO X PLAY Custom ROM development?
ReplyDeletei want to know is there any rom for micromax knight 2 ..?
ReplyDeletei am using ur ported rom miui 8 but facing resolution issue icons are too small of statusbar and launcher and in some apps facing resolution problem like fb lite Help! thnks in advnce
You said to delete the lines which says about flashing radio image, modem image.. So which line contains them?
ReplyDeleteOne question here.
ReplyDeleteCan i port Yureka Plus Color OS 3.0 Lollipop rom to the Moto X Play with Lollipop or CM base?
Yeah, you can try. It should work.
Deletewhat do you think one should do to fix a ported rom which stuck at starting app after using the above guide. after flashing the rom through twrp recovery while booting, the screen light will dim a bit and after some seconds it will start optimizing app from 0 to 100 and stuck at starting app.
ReplyDeletePlease tell me exactly all the files that I should compare in boot/ramdisk folder I have tried all the solutions above but I am only able fix the sensor issue my phone not showing any simcard, wifi, Bluetooth please help
ReplyDeleteI appreciate your work, I have successfully ported MIUI 8 rom for my device,it work great, I had been fixing bugs for hours, the only thing that didn't work is the camera (can't connect to camera problem) I even read all the comment looking for more fixes and even in other websites but nothing works, any HELP ?
ReplyDeleteDUDE... I am using xolo black 3 gb. i want to port rom from LyF earth 1. both models have same specification like qual snapdragon 615, dual rear camera with same mp, same 3 gb ram, same screen resolution except battery backup (XOLO BLACK - 3200 MAH BUT LYF EARTH1 - 3400 MAH) and android version (black - 5.0.2 but lyf earth1 - 5.1.1). please kindly suggest me to porting rom.... thanks
ReplyDeletehello can you please suggest me a rom for porting miui 8 to motorola moto maxx(quark)
ReplyDeletethanks in advance!
Bro in some phones wlan.ko file is not there & replacing libwcnss_qmi.so to fix wifi issue will not work so u had to replace
ReplyDeletesystem/lib/libhardware_legacy.so
system/lib64/libhardware_legacy.so
From stock to port & also
system/lib/libwcnss_qmi.so
system/lib64/libwcnss_qmi.so
This^^ files
Some times by replacing libhardware_legacy.so gives bootloop (in cross Ported Roms)
but this fix is tested in many Port Roms by me
ir how to add init.rc lines
ReplyDeletei try to add but not working
can you make a video init.rc edditing Qualcomm
youtube and other place not found this topic full details
plz make a video
Sir I want to port/change the system coz stock rom is very slow . LYF Flame 1 to LYF Falme 2 or Flame 8, the main part is hardware & software are quiet same but when im am trying to flash it sayes some errors, sir im am totally new in this fild so please tell me how to flash LYF Flame 8 Rom in LYF Flame 1.
ReplyDeleteAsps mail me : sudevbose@gmail.com
There is no boot.img-dtb file in my ZE550KL boot.img for Marshmallow. What I need to do?
ReplyDeleteHey, bro.
ReplyDeleteI have a problem. I always get a notice when I try to install PORT ROM using TWRP. It says: "Mount: failed to mount ........ at /system (invalid argument).
I think the problem is updater_scipt. I have try to fix it. But, always still get this error.
Please help me.
Thanks.
No files are there...
ReplyDeleteWhat to do Lenovo vibe K5
Latest miui8 for ido help me plzz
hey i try to port bisspop,miui 8 lolipop rom on my snapdragon 615 chipset (LYF EARTH 1) i port rom and boot up successfully but bug not fix i try many time
ReplyDeletecan you help me to port the rom.
im trying to port nubiaui for mi4 but camera not working.
ReplyDeleteI want to port miui v7 kk from mi3w to my LG G2 vs980. Which base rom should I choose, cm11 or stock kk?
ReplyDeleteHello help me
ReplyDeleteI have ported a rom it booted but camera wifi and sensors are not working I have tried to replace some files
But my port rom contains sensors.ldm6db0.so
But my stock contains sensor.goldfish.so and sensors.ranchu.so
Help me
hey i port a rom miui 8 on my lyf earth 1 ( msm8916 )
ReplyDeletei fixed sound and brightness bugs but wifi still not fix i try many time ...
canyou tell me sir how to fix this
can i port nogut rom on my lyf earth 1 ( stock lolipop)
I want to port miui in moto x play. which is same as mi4i and yu yureka same hardware configuration. because moto doesn't give video calling from dialer and miui have this. But i also not want to loose slow motion record fxn from stock(which is not available in any custom rom).
ReplyDeleteGive me suggestions.
Aaditya
Sucsesfuly booting , but bug permission denied on storage , camera not connected , wifi and hotspot cannot on
ReplyDeleteHi i i have a miui 8 for lg g3 but its too old and developer also stopped so how can i update it i m trying to update using xiami mi note latest miui 8 rom
ReplyDeleteSir How to fix voLTE ? Sir
ReplyDeleteMIUI 9 ROM from Redm4 to ported to redmi3s
I am trying to port miui 9 to my redmi 3s from redmi 4x which is almost identical phones.For the base rom i am using Lineage 14.1 and port rom is miui 9 based on nougat i habe successfully edited all the files and replaced everything as mentioned in the guide and also edited the boot img but after flashing my phone does not boot up at first the mi logo gets displayed and after 10-15 sec the screen turns off and i have to press the power button for very long to reboot or to boot the phone in recovery what should i do
ReplyDeleteAfter port and flash my phone stuck on boot loop..... I tried every instruction step by step.... but it's not working.... What I doing wrong.... plz help 😓😓😓
ReplyDeleteneed to help for Zuk Z2 Pro miui 9 port . it is really hard for me.
ReplyDeleteI have commented a question in this thread but the comments are not getting loaded after a particular individual's comments i am trying to access this website both vai my laptop as well as mobile but both the time same prob there is a "load more" option at the end but that doesn't seems to be working i have asked a question previously but i didn't now whether anyone has replied to it or not as i am not able to see any further comments is this a site issue please fix it
ReplyDeleteSIR PRESENT REDMI NOTE PRIME DEVELOPMENT IS DEAD AND I AM TRYING TO PORT LINEAGE 14.1 USING CM 13 ROM AS BASE
ReplyDeleteI WILL WORK USING THIS GUIDE PLEASE GIVE REPLY SOON
i want to port miui9 rom for lenovo zuk z1. Which rom am i supposed to take as port rom
ReplyDeleteCan i use this method for j700f or exynous powered phones
ReplyDeleteI can use rom stock LG 6.0 MM (LG SPIRIT SP410) to carry MIUI 8 6.0 MM (MOTO G3 SP410)
ReplyDeletecan i port miui 9 of redmi3s prime to lenovo k6 power both have same snapdragon 430 processor?
ReplyDeleteCan ibport MIUI 9 of Samsung j5 for Samsung e7 e700h both have same hardware please reply
ReplyDeleteHello I ported Rom for my lyf f1s From leeco le 2. Everything is works perfectly but some time it not boot complete and I have to hold power and volume down button to boot it again how to I fix this.
ReplyDeletecan i ported to android 5.0.2 to the same android version(5.0.2)
ReplyDeleteI have exactly the same specs i want to port miui 8.1 to my snapdragon 615 qualcomm msm8939 with the same android version like i said and ths same ram cpu ghz i think all
I failed so many times porting miui 8.1 for my device( msm8939 qualcomm 405 snapdragon 615)
ReplyDeleteThen miui is for msm8939 so i port it using my stockrom but i failed can you help me?
im confused at comparing files i cannot understand what are you saying
This guide works on MIUI 9 based on nougat? I tried whit my Lenovo K6 but no boot
ReplyDeletebro help mi i am ported miui rom for the micromax e455 and all bugs are fixed but internet not working data showing but not speed plz help
ReplyDeletehi bro in init.rc file editing section you have told about adding given lines in port init.rc file in appropriate places, how can we find those appropriate places
ReplyDeleteim trying to port nubia ui for my device. I want to know how did you fixed mobile data not working. thanks sir
ReplyDeleteHey buddy, my device zuk z2 plus already have very stable miui 9 nougat, one of devs bringed miui oreo but it have some serious bugs like wifi hotspot fingerprint camera etc not working system is slow its fc battery backup is bad and its heating too much. Now as miui 10 is launched for Gemini i m looking to port miui 10 Oreo directly, can i take miui 9 nougat as base. Can u update your guide with miui 10 port.
ReplyDeleteI m hoping you will include more bug fixes too.
bro i have ported and bugs are
ReplyDelete*.automatically settings has been closed
*automatic reboot
*boot time increased
how to fix these bugs bro