Full width home advertisement

Android

Android ROMs

Post Page Advertisement [Top]

Android

[2019] How to port MIUI 9 & MIUI 10 ROMs to Qualcomm powered Smartphones

Ported MIUI 10
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 LinuxSuperR'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)
Now let’s start porting.

Preparing Porting Environment

  1. Make sure you have plenty of hard-disk space in your PC.
  2. Make a folder named MIUI-PORTING-PROJECT (you may take any other name)
  3. Inside that folder create two folders: (i) BOOT-EDITING  (ii) ROM-PORTING
  4. In ROM-PORTING folder create two folders named BASE and PORT (this is the main working folder)
  5. Similarly inside the BOOT-EDITING folder create two folders named BOOT-BASE and BOOT-PORT
  6. 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.
  7. 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.
These steps are required to properly organize the project and will be helpful in our later discussions.

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

  1. Open the updater-script file in PORT/META-INF/com/google/android/ with Notepad++.
  2. Delete the first line containing “get_device_compatible(….” or “assert(getprop….” which restricts the flashing process to other devices.
  3. Then delete the lines containing scripts for flashing radio image, modem image etc. which are not required for our base device.
Now you are ready to go.

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.

Editing Boot IMG
Replacing boot.img files
3. Then in the BOOT-PORT/ramdisk/ folder compare the file fstab.qcom with that of the base i.e. BOOT-BASE/ramdisk/fstab.qcom. (You can use Meld for it.)
Editing fstab.qcom Step 1
Editing fstab.qcom using Meld: Step 1
Editing fstab.qcom Step 2
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
system/lib64/hw/
  • 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’)

Sensors not working:
  • 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
If still not fixed then try further replacing the following files:

  • 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
[Note: In MIUI, wlan.ko is renamed as pronto_wlan.ko and is also kept in system/lib/modules/pronto/ folder, so you have to replace in both the places.]

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
[Note: If such files are also available in your BASE/system/vendor/lib64/ then you have to copy those files also to their respective place in PORT]

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: nitesh9
MIUI Forums: nitesh9

My works

MIUI v7 Lollipop Global and China Beta for YU Yureka: XDA Forums | MIUI Forums

MIUI 8 Global and China Beta ROM for Yureka and Yureka Plus: OS Busters | XDA Forums


For any queries or discussion please comment below...




You May Also Like

420 comments

  1. 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?

    ReplyDelete
    Replies
    1. Yeah you can try. Don't forget the credits and source. :p

      Delete
  2. i 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

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Hi nitesh.
    Very 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 ?

    ReplyDelete
    Replies
    1. 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.

      Delete
    2. I 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.

      Delete
  5. Hi Nitesh
    I 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

    ReplyDelete
  6. Do you know any device similar to Xperia M? I. can't find any :(

    ReplyDelete
  7. is it possibile port Miui 8 to Samsung s5 ?

    ReplyDelete
  8. Bro how to fix bugs of heating, battery draining, multi touch issue, & performance lagging issue in ported miui v8 rom

    ReplyDelete
  9. i want to port miui 64bit lollipop rom to yuphoria so what to choose

    ReplyDelete
  10. How 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.

    ReplyDelete
  11. You said "#Add all these lines under 'on post-fs-data' in appropriate places
    on post-fs-data", but what places are the appropriate?

    Sorry, firt rom port try :p

    ReplyDelete
  12. I am ported Miui8 for Lgg2 but stuck in bootanimation. Adb doesn't see my phone what's problem?

    ReplyDelete
    Replies
    1. Hello bro just boot.img init.rc properly editing to solve the boot animation problem

      Delete
  13. Getting stuck at boot
    http://pastebin.com/Q8SxXGsN

    ReplyDelete
  14. Can't boot.
    Nexus 6P
    http://pastebin.com/Q8SxXGsN

    ReplyDelete
  15. 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.

    ReplyDelete
  16. Dude, thank you. I finally have the info and I fixed the video recording bug on my rom for the Mi Max. Thanks again.

    ReplyDelete
  17. Hi nitin prasad can u help me porting from mi4 to zuk but stuck at bootlogo not working pls help bro

    ReplyDelete
  18. I 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???

    ReplyDelete
  19. I 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.

    ReplyDelete
  20. I 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.

    ReplyDelete
  21. can you port miui 7 stable of redmi 2 prime for coolpad dazen 1

    ReplyDelete
  22. I 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.

    ReplyDelete
  23. sir 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

    ReplyDelete
  24. Hi 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

    ReplyDelete
  25. I 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 ?

    ReplyDelete
  26. Sir 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

    ReplyDelete
    Replies
    1. Check for any missing symlinks. Also replace etc/firmware files.

      Delete
  27. Hai 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

    ReplyDelete
  28. Bro 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.....

    ReplyDelete
  29. Hi 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
    As 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

    ReplyDelete
    Replies
    1. Replace system/etc/firmware/ files from a working ROM.

      Delete
  30. is there any way that you can port a rom for my device(knight2)

    ReplyDelete
  31. Sir i will camera bug fixed not it open os starting file but booted how to solve

    ReplyDelete
  32. Are 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.

    ReplyDelete
  33. I 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.

    ReplyDelete
  34. Bro this method used to port successful
    Bug
    1)internal memory not open
    2)camera not open
    How to slove tell me please

    ReplyDelete
    Replies
    1. Check mount points in fstab.qcom in ramdisk for internal memory. Also check storage-list.xml in framework-res.apk.

      For camera try replacing other camera related files.
      Also check ramdisk for camera related lines.

      Delete
  35. Could you port a Rom for Phicomm EX780L, the stock is a chinese one and there is one ported but whatsapp dont work.

    ReplyDelete
  36. Hi,
    I 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?

    ReplyDelete
  37. Hi Mr. Nitesh Prasad,

    first 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

    ReplyDelete
    Replies
    1. Check fstab.qcom for any additions or ommitions. Replace etc/firmware files.

      Delete
  38. If there is a possible way that Asus zenfone 2 laser ZE550KL will support MIUI V8??

    ReplyDelete
    Replies
    1. If you are using SD 615 version then you can port it from Mi4i.
      If you are using SD 410 version then you can port it from Wileyfox Swift or Redmi 2 Prime.

      Delete
    2. Does redmi 2 prime support VoLTE? i need a volte based rom

      Delete
    3. I don't think so. But Redmi 3 supports VoLTE.

      Delete
  39. Hello 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

    ReplyDelete
  40. Hi sir, pls tell me how to port stock camera app from coolpad dazen 1 to miui 8.

    ReplyDelete
    Replies
    1. You can port stock camera app by modding it. Search for app porting guide on XDA.

      Delete
  41. Hai 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

    2)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

    ReplyDelete
    Replies
    1. Check and edit system/etc/mixer-paths.xml and replace system/etc/acdbdata/ all files.

      Delete
    2. If you are porting color os then for led notification you have to give the apps lockscreen notification permissions from Permission Manager.
      Also in Color OS 3.0 there is no led notification for charging.

      Delete
  42. 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

    ReplyDelete
    Replies
    1. Check updater script, you must have missed some lines like 'package extract directory....'

      Delete
    2. I 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

      Delete
  43. Can I use this guide for porting TouchWiz ROM

    ReplyDelete
  44. Nitesh only media volume is 100℅ increased sound not coming on speaker
    But 1℅ reduced sound is coming speaker worked and this method not working

    ReplyDelete
    Replies
    1. You need to edit etc/mixer-paths.xml.

      Delete
    2. Nitesh I have solved the problem on copy the audio related files on (etc and lib)
      And only one bug incoming call can't show on display.and only black screen plz tell me how to fix

      Delete
    3. It's a proximity sensor bug (you can check through CPUZ app). Are other sensors working?
      If yes then add missing lines related to sensors in ramdisk/file-contexts from base to port.

      Delete
    4. Bro I am tried but not work plz any idea

      Delete
    5. You need to edit the ramdisk/file-contexts file and missing lines related to proximity sensor etc. from the base file-context.

      Delete
  45. Hi 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.

    ReplyDelete
    Replies
    1. No idea about that. You have to search that yourself

      Delete
  46. Bro is MIUI8 patchROM available ? thanks for the great guide

    ReplyDelete
  47. I 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

    ReplyDelete
    Replies
    1. Yeah, you can use TWRP file manager but don't forget to give correct permission.

      Delete
  48. im allways in bootloop. used as based Mooke rom / stock rom
    any idea? can't get logcat. i also pm u on xda

    ReplyDelete
    Replies
    1. Edit ramdisk/default.prop => ro.debuggable=1
      Then you'll be able to logcat.

      Delete
    2. This is Logcat ( Last_kmsg)
      http://pastebin.com/0STXgCxw

      Logcat is about 3.3mb,
      http://forum.xda-developers.com/showpost.php?p=69074776&postcount=1200
      here is link

      Delete
  49. HI
    I 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

    ReplyDelete
  50. is 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?

    ReplyDelete
  51. I have been trying to port MIUI to the nexus 6P. It freezes at the MI boot logo during boot though.

    ReplyDelete
    Replies
    1. Try editing fstab.qcom correctly. Also try replacing etc/firmware files.

      Delete
  52. Hi
    i 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]

    ReplyDelete
  53. Can I port HTC desire 820 5.1.1 os to yureka with cm12.1 as base.??
    I tried to starting port Samsung a7 ROM to yureka,but there is no meta info folder in it.

    ReplyDelete
  54. Hii Nitesh,
    I 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.

    ReplyDelete
    Replies
    1. Always use latest TWRP Recovery. Check updater script for errors.

      Delete
  55. Sir , Phicomm Passion 660 also houses Snapdragon's (ARM64)(MSM8939) like YU Yureka+ and MI4i device.
    And 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 .

    ReplyDelete
  56. 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 .

    ReplyDelete
    Replies
    1. You need an Android 5.0.2 based stock ROM. Since MIUI 7/8 for Mi4i is based on Android 5.0.2.

      And yes you may follow this guide to port ROMs to your device.

      Delete
  57. Hi NITESH,

    Actually 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

    ReplyDelete
  58. 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.

    ReplyDelete
  59. Can I port z3 compact it use same processor mi4

    ReplyDelete
  60. DID EVERYTHING AS SAID BUT GETTING STUCK ON MI LOGO
    I 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

    ReplyDelete
  61. I'm porting miui v7 lollipop(mi4i) to xperia m4 aqua but i have a big bug, SIM CARD don't detect ¿Any solution?

    ReplyDelete
  62. I tried v8 MIUI port of cm13 lg nexus 5 for D838. But I always fail "Erro boot ...". Can you help me build boot.img?

    ReplyDelete
  63. I tried v8 MIUI port of cm13 lg nexus 5 for D838. But I always fail "Erro boot ...". Can you help me build boot.img?

    ReplyDelete
  64. The MIUI8 build when flashing in TWRP on my M8 just keeps on flashing and nothing happens. Please help?

    ReplyDelete
  65. gionee e7 miui 8 is it possible???????????????/

    ReplyDelete
  66. thanks 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.

    ReplyDelete
  67. Hello, 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:
    1. 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...

    ReplyDelete
    Replies
    1. Follow the Bug-Fixing section in the guide above.

      Delete
    2. Thanks 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 ...

      Delete
    3. If you have already replaced the libs in system folder then you have to edit the ramdisk files like init.rc, ueventd.rc etc.
      And you have to add lines in your ramdisk/file-contexts file from base.

      Delete
  68. 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" :)
    Thank you very much for your reply.

    ReplyDelete
  69. 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?

    ReplyDelete
  70. For old device ? Please recommended for My device galaxy young gt-s6310
    Sorry i'm bad English, i'm from Indonesia

    ReplyDelete
  71. 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)?
    Thanks.

    ReplyDelete
  72. can samsung j5/a3 be port to lenovo a6010 plus with this guide?

    ReplyDelete
  73. I 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

    ReplyDelete
    Replies
    1. Try replacing etc/firmware/ files and also try replacing RIL libs for the Dialer FC issue.
      For sound replace sound related libs as directed in the above Post. If doesn't fix then replace etc/ mixer-paths.xml and acdbdata files.

      Delete
  74. Mixer-paths.xml is not available in both roms

    ReplyDelete
  75. Hello sir..i have zenfone 2laser 2gb varient..i want to port mybrom to miui 8 how can i do it sir??0please help mee

    ReplyDelete
  76. can i port miui 7 for samsung grand prime

    ReplyDelete
  77. can i port this rom on Broadcom BC28155 device ?

    ReplyDelete
  78. hi 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 ????

    ReplyDelete
  79. Bro difference between qualcomm sd410 msm8916 and Qualcomm sd410

    ReplyDelete
  80. What if the two devices have different display size
    Mine (Huawei Y550) is 240dpi, the other one (Redmi 2 Prime) is 320dpi

    ReplyDelete
  81. hello nitesh please tell me how to editing or modify the system used .so file and which softwer used to open the file

    ReplyDelete
  82. Hello 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

    ReplyDelete
  83. Great tut, just 1 question
    I 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?

    ReplyDelete
  84. Hi there. I am trying to port miuiv7, but stuck in a bootloop. replaced those 3 libs but didn't help.
    As 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

    ReplyDelete
  85. 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?

    ReplyDelete
    Replies
    1. Edit your boot.img/ramdisk/default.prop and change the line like this:

      ro.debuggable=1

      Delete
  86. 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.

    ReplyDelete
  87. hey, 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!

    ReplyDelete
    Replies
    1. You may try...I succeeded in porting sd410 ROM to sd615.

      Delete
  88. i ported ur rom to asus ze550kl the rom installed but lastly it shows no os installed..pls help

    ReplyDelete
  89. I want to port Nubia ROM on yureka plus can u plz help in what should be my base rom

    ReplyDelete
  90. Hello! Can I use this guide for porting MIUI on Vernee Apollo Lite? It has MTK6797 procc, not Qualcomm

    ReplyDelete
  91. Hello, 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

    ReplyDelete
  92. permission to bookmark your post sir, will do porting miui for my device later with help of your works.
    thanks in advance

    ReplyDelete
  93. Sir, can i port rom ZenUI from zenfone laser 2 to my phone Redmi 3 using this guide.?

    ReplyDelete
  94. hi... is it possible to port xiaomi resmi 3 rom to oppo f1f?

    ReplyDelete
  95. how i can port miui yureka to YUTOPIA Nitesh Sir Plz Help me
    I choose CArbon RoM Base Rome And Port Rom IS YUREKA miui 8

    ReplyDelete
    Replies
    1. This is because of different chipsets in both the devices. Cross chipset porting is very difficult and not recommended for beginners.

      Delete
    2. Try to port oneplus 2 miui ROM

      Link:-https://forum.xda-developers.com/oneplus-2/development/rom-t3497034

      Don't forget to take permission ;)

      Delete
  96. Good Day,
    Sir can I port MiUI base on Android 5.0.2 to my device Android 5.0.1 as base.?
    Thank you in advance. :)

    ReplyDelete
    Replies
    1. You may give it a try. It should boot, but cannot guaranty about camera to work.

      Delete
  97. Please....can you say me for Qualcomm MSM8952 Snapdragon 617 ???...what rom (devices) I need for port miui 8...help!

    ReplyDelete
  98. Sir Nitesh Please help me how to port MiUI Yureka to my phone Starmobile Knight Elite.
    I choose my stock ROM as base and MiUI Yureka as Port.
    Help!!! :')

    ReplyDelete
  99. 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

    ReplyDelete
  100. Having 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).

    I 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

    ReplyDelete
    Replies
    1. Yeah it's related to symlinks...Phone, Wifi and many other system apps like Gallery etc. require some special symlinks...

      You try extracting your system.img of the ROM using SuperR's Kitchen. It creates updater script automatically.

      Delete
  101. Hello Nitesh,

    I 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...

    ReplyDelete
  102. Is this guide will work to port miui 8.2 based on android 7?

    ReplyDelete
  103. I 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

    ReplyDelete
  104. I want port rom miui 8 for ASUS Zenfone 2 Laser ZEE500KG

    ReplyDelete
  105. Hi, can you port miui 8 for moto x play

    ReplyDelete
  106. Tried 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?

    ReplyDelete
  107. i want to know is there any rom for micromax knight 2 ..?
    i 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

    ReplyDelete
  108. You said to delete the lines which says about flashing radio image, modem image.. So which line contains them?

    ReplyDelete
  109. One question here.
    Can i port Yureka Plus Color OS 3.0 Lollipop rom to the Moto X Play with Lollipop or CM base?

    ReplyDelete
  110. what 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.

    ReplyDelete
  111. Please 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

    ReplyDelete
  112. I 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 ?

    ReplyDelete
  113. DUDE... 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

    ReplyDelete
  114. hello can you please suggest me a rom for porting miui 8 to motorola moto maxx(quark)
    thanks in advance!

    ReplyDelete
  115. 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
    system/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

    ReplyDelete
  116. ir how to add init.rc lines

    i 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

    ReplyDelete
  117. 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.
    Asps mail me : sudevbose@gmail.com

    ReplyDelete
  118. There is no boot.img-dtb file in my ZE550KL boot.img for Marshmallow. What I need to do?

    ReplyDelete
  119. Hey, bro.

    I 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.

    ReplyDelete
  120. No files are there...
    What to do Lenovo vibe K5
    Latest miui8 for ido help me plzz

    ReplyDelete
  121. 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

    can you help me to port the rom.

    ReplyDelete
  122. im trying to port nubiaui for mi4 but camera not working.

    ReplyDelete
  123. I want to port miui v7 kk from mi3w to my LG G2 vs980. Which base rom should I choose, cm11 or stock kk?

    ReplyDelete
  124. Hello help me
    I 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

    ReplyDelete
  125. hey i port a rom miui 8 on my lyf earth 1 ( msm8916 )

    i 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)

    ReplyDelete
  126. 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).
    Give me suggestions.
    Aaditya

    ReplyDelete
  127. Sucsesfuly booting , but bug permission denied on storage , camera not connected , wifi and hotspot cannot on

    ReplyDelete
  128. Hi 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

    ReplyDelete
  129. Sir How to fix voLTE ? Sir
    MIUI 9 ROM from Redm4 to ported to redmi3s

    ReplyDelete
  130. 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

    ReplyDelete
  131. After 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 😓😓😓

    ReplyDelete
  132. need to help for Zuk Z2 Pro miui 9 port . it is really hard for me.

    ReplyDelete
  133. I 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

    ReplyDelete
  134. SIR PRESENT REDMI NOTE PRIME DEVELOPMENT IS DEAD AND I AM TRYING TO PORT LINEAGE 14.1 USING CM 13 ROM AS BASE
    I WILL WORK USING THIS GUIDE PLEASE GIVE REPLY SOON

    ReplyDelete
  135. i want to port miui9 rom for lenovo zuk z1. Which rom am i supposed to take as port rom

    ReplyDelete
  136. Can i use this method for j700f or exynous powered phones

    ReplyDelete
  137. I can use rom stock LG 6.0 MM (LG SPIRIT SP410) to carry MIUI 8 6.0 MM (MOTO G3 SP410)

    ReplyDelete
  138. can i port miui 9 of redmi3s prime to lenovo k6 power both have same snapdragon 430 processor?

    ReplyDelete
  139. Can ibport MIUI 9 of Samsung j5 for Samsung e7 e700h both have same hardware please reply

    ReplyDelete
  140. Hello 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.

    ReplyDelete
  141. can i ported to android 5.0.2 to the same android version(5.0.2)
    I 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

    ReplyDelete
  142. I failed so many times porting miui 8.1 for my device( msm8939 qualcomm 405 snapdragon 615)

    Then 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

    ReplyDelete
  143. This guide works on MIUI 9 based on nougat? I tried whit my Lenovo K6 but no boot

    ReplyDelete
  144. bro 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

    ReplyDelete
  145. hi 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

    ReplyDelete
  146. im trying to port nubia ui for my device. I want to know how did you fixed mobile data not working. thanks sir

    ReplyDelete
  147. Hey 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.
    I m hoping you will include more bug fixes too.

    ReplyDelete
  148. bro i have ported and bugs are



    *.automatically settings has been closed
    *automatic reboot
    *boot time increased


    how to fix these bugs bro

    ReplyDelete

Bottom Ad [Post Page]