Install MIUI ROM on your phone with Dual Boot

How to flash MIUI ROM with Dual Boot Patcher

In case you’ve always wanted to try MIUI, but can’t jump straight into it or maybe you want to use two different ROMs on your Android phone, here’s our recommendations on how to install MIUI as a second system using the Dual Boot Patcher.

Install MIUI ROM on your phone with Dual Boot

Please pay attention! We are not responsible for any issues with your device. You do everything at your own risk.

First of all you’ll need to download Notepad++ and Android Image Kitchen:

  1. Grab boot.img file from downloaded MIUI ROM and drag-n-drop to unpackimg.bat file.
  2. You’ll see two folders after unpacking “ramdisk” and “split_img”.
  3. Use Notepad++ open “default.prop” and add the following lines or change existing ones:
  4. Next open “fstab.qcom” and remove “verify” if you’ve see any:
    /dev/block/bootdevice/by-name/system         /system      ext4    ro,barrier=1,discard                                wait
  5. Open “init.rc” and add the following lines to the bottom:
    #service for shelld
    service shelld /system/xbin/shelld
        class main
    #service for su
    service su_daemon /system/xbin/su --daemon
        class main
  6. In “init.qcom.rc” find “on property:sys.boot_completed=1” line and add the following above it:
    service shelld /system/xbin/shelld
        class main
  7. Delete “emmc_appsboot.mbn” file in “firmware-update” folder.
  8. Go to “ROMFOLDER\META-INF\com\google\android” and edit “updater-scrypt” file. Delete the following 6 lines:
    package_extract_file("META-INF/com/miui/miui_update", "/cache/miui_update");
    set_metadata("/cache/miui_update", "uid", 0, "gid", 0, "mode", 0555, "capabilities", 0x0);
    show_progress(0.600000, 120);
    ui_print("Patching system image unconditionally...");
  9. Delete these lines:
    package_extract_file("firmware-update/emmc_appsboot.mbn", "/dev/block/bootdevice/by-name/aboot");
  10. Delete the last one:
    package_extract_file("firmware-update/emmc_appsboot.mbn", "/dev/block/bootdevice/by-name/abootbak")
  11. And finally delete “miui_update” file from “ROMFOLDER\META-INF\com\miui”.
  12. That’s it! We’ve finished editing boot.img file.
  13. Now press on “repackimg.bat” to make the new one, the image-new.img file will be created. Rename and replace the original boot.img file in rom folder.
  14. Now use WinRar and WinZip to make archive the unpacked rom.
  15. The MIUI ROM is now ready to use with TWRP or DualBootPatcher.