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: Android.Image.Kitchen.v2.7-Win32.zip
- Grab boot.img file from downloaded MIUI ROM and drag-n-drop to unpackimg.bat file.
- You’ll see two folders after unpacking “ramdisk” and “split_img”.
- Use Notepad++ open “default.prop” and add the following lines or change existing ones:
ro.miui.has_cust_partition=true ro.secureboot.devicelock=0 ro.secure=0 security.perf_harden=0 ro.allow.mock.location=0 ro.adb.secure=0 ro.debuggable=1 persist.sys.usb.config=mtp,adb persist.service.adb.enable=1 persist.service.debuggable=1
- 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
- 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 oneshot
- 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
- Delete “emmc_appsboot.mbn” file in “firmware-update” folder.
- 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); run_program("/cache/miui_update"); delete("/cache/miui_update"); show_progress(0.600000, 120); ui_print("Patching system image unconditionally...");
- Delete these lines:
package_extract_file("firmware-update/emmc_appsboot.mbn", "/dev/block/bootdevice/by-name/aboot");
- Delete the last one:
package_extract_file("firmware-update/emmc_appsboot.mbn", "/dev/block/bootdevice/by-name/abootbak")
- And finally delete “miui_update” file from “ROMFOLDER\META-INF\com\miui”.
- That’s it! We’ve finished editing boot.img file.
- 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.
- Now use WinRar and WinZip to make archive the unpacked rom.
- The MIUI ROM is now ready to use with TWRP or DualBootPatcher.