[PATCHER][APP][OFFICIAL] Dualboot/Multiboot For Redmi Pro

Status
Not open for further replies.

yshalsager

Recognized Developer
Oct 13, 2014
3,802
7,158
263
Cairo
xiaomifirmwareupdater.com
I am proud to present first Dualboot project For Redmi Pro. This will allow any number of ROMs to be installed at the same time. It works by patching the secondary ROM's installation scripts and boot image to load the ROM files from an alternate location (/system/multiboot, /cache/multiboot, and /data/multiboot). Because of the way this is implemented, no changes to the primary ROM are necessary :D

What is DualBootPatcher?
DualBootPatcher is an open-source app that allows multiple ROMs to be installed on a single Android device. It does its best to work with existing code and does not require explicit support from ROMs. There are currently 200+ supported devices and their variations.

Information:
I have managed to support for Redmi Pro to the DualBootPatcher App, I am not the creator, just the supporter.
It's awesome and useful for testing out roms or if you want, switching ROMS.

Disclaimer:
Code:
Your warranty is now void.
I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. Please do some research if you have any concerns about features included in this ROM before flashing it! YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.
Requirements:
1. A Custom Recovery (TWRP)
2. A ROM :D
3. Dual Boot Patcher app and the DualBootUtilities.zip from the download section below.

What does the app do ?:
It patches...
  • Custom kernels for dual boot support
  • ROMs so that they can be installed as secondary
  • Google Apps packages for AOSP-based ROMs
  • SuperSU so that it can be used in the secondary ROM

What's supported ?
Except Toaster and Alarm clocks pretty much everything is supported.
How to use the App?
- Download, install and open the app.
- Swipe to the right to open the menu. Click "ROMS". Now if this is the first time you use it, it will ask you if you want to set kernel. Do so!
- After it has finished go to ROM Settings (primary ROM 3 dot menu) and select Update Ramdisk. It will update it and will ask you to reboot. Press Reboot Now, or Reboot later.
- Now Download any ROM you like and open the app again and open the menu and open Patch Zip File from the menu. Ensure that your Device is set to (eyeul) and under Partition configuration select secondary (will install 2nd ROM in /system) or data slot.
- Click continue and select where to save the patched file.
- You should see the file is being put in "Queue". Just click the confirm button to the upper right.
Note: If you want to go back, just swipe the ROM in queue to right and start over.
- The app will patch the zip. When done, go back to "ROMs".
- Click "Flash zip files" (the big pink button on the lower right). Click the pink plus button to add your previously patched zip file.
- Locate the file you have patched in step 7. Unless you have changed the name there, it should be something like ROM_name_partition_config_ID.zip (like RR-N-v5.8.3-20170707-omega-Unofficial_dual.zip).
- Click on that file and choose "Keep location". Now confirm the flash with the button on the upper right side.
Note: You can also install the patched zip files in recovery.
- It will now open the terminal and begin flashing the file. This requires some patience. After it has flashed the file you'll see success message in green.
- Now click back and you should see your newly installed ROM along with the Primary ROM.
Note: You can find more options by clicking on the three buttons on each ROM.
- Now reboot and wait till finishing 2nd ROM first boot. install DualBootPatcher apk so you can easily switch ROMs, there is another way to change ROMs: flash DualBootUtilities.zip and switch ROM manually.
Note: Using Bootui:
- Open app then select settings and press install (update) bootui. then Swipe to the right to open the menu. Click "ROMS" again and open secondary ROM Settings) and select Update Ramdisk, Now you can change ROMs simply using boot ui (something like grub bootloader but it works like twrp)

Partitions Configurations:
The patcher offers several locations for installing ROMs:
  • Primary: This is normally used for installing a zip to the primary ROM. It is not required, but is strongly recommended because it has code to prevent the zip from inadvertently affecting other ROMs.
  • Dual: Dual/Secondary is the first multiboot installation location. It installs to the system partition. This is a good spot for installing a second ROM because it doesn't take any space away from the internal storage.
  • Multi-slots: There are 3 multislots: multi-slot-1, multi-slot-2, multi-slot-3. These install to the cache partition. This is specifically for devices, like the Galaxy S4, that have a massive cache partition.
  • Data-slots: There can be an unlimited number of data slots. These install to the data partition and eat up space on the internal storage. This is useful for devices where the system partition is nearly full and the cache partition is tiny. These slots are named "data-slot-[id]", where "id" is something you provide in the app.
  • Extsd-slots: There can be an unlimited number of extsd slots. These install to the external SD card, which is useful as it keeps the ROMs off of the internal storage. Note that the ROM's data files are still stored on the data partition.

How to boot to another ROM ?
This is simple ... There is no reboot to primary, secondary or whatever. So all you have to do is:
1) Go to ROMs section of the App.
2) Click on the ROM you want to boot to. You should see "Switching ROM" message. After few seconds, you should see a report message saying that "ROM successfully switched".
3) Now just do a normal reboot of your device. See the magic! It should boot to the ROM you have switched on step 2.
Note: You can find more options by selecting the three buttons on each ROMs (like creating reboot widgets for directly rebooting to specific rom).
You also need to install the App to all of the ROMs you install. Otherwise, you want be able to boot to other ROMs!

Apps and Data sharing:
DualBootPatcher very recently got support for sharing apps and their data across ROMs. Maybe sharing is somewhat of a misleading term. The feature actually makes Android load the shared apps and data from a centralized location, /data/multiboot/_appsharing. So you're not sharing apps from one ROM to another per se. The ROMs are just loading the apps from one shared location. Let me make this clearer with an analogy.

Think of the people in a company office as ROMs. You want to share with your coworkers some documents (apps). Instead of telling them to come over to your desk to see those documents (sharing apps from one ROM to another), everyone goes to the conference room to look at the documents together (loading apps from a shared location). That's how app and data sharing is implemented.
To use app sharing, follow these steps in every ROM that you want to use app sharing: (doesn't work with JB ROMs)
  • Install the app you want to share
  • Open DualBootPatcher and go to "App Sharing" in the navigation drawer
  • Enable individual app sharing
  • Tap "Manage shared applications" and enable APK/data sharing for the app
  • Reboot
When you uninstall an app that's shared, it simply become unshared for the current ROM. That way, other ROMs are not affected. To continue the analogy above, if you quit your job, you won't shred the documents that everybody else was looking at.

If you unshare an app's data, it will go back to using the data it had before it was shared. In other words, you leave the conference room and go back to work on your own documents at your desk.
Other How to ?
Wipe /cache, /data, /system, or dalvik-cache?
The easiest way is to do it from the app while booted in another ROM. Just go to "Roms" in the navigation drawer, tap the 3 dots options menu for the ROM you want to wipe, and tap "Wipe ROM".
Update the primary ROM?
Patch the zip for primary and flash it. The "primary" installation target is designed so that other ROMs won't be affected when you want to flash something for the primary ROM.
Update a non-primary ROM?
Patch and flash the zip exactly like how you did it the first time.
Flash a mod or custom kernel for the primary ROM?
Patch it for primary before flashing. If the zip does not wipe /cache, it is also safe to flash it directly.
Flash a mod or custom kernel for a non-primary ROM?
Just patch and flash it :)

Downloads:
Cheers ! we are officially supported :D

Note: You can download any version since "9.2.0.r295.g3b684238"


Screenshots:
No Screenshots, I need some :p

Sources:
DualBootPatcher: https://github.com/chenxiaolong/DualBootPatcher
DualBootUtilities: https://github.com/chenxiaolong/DualBootZips
Build instructions: https://github.com/chenxiaolong/DualBootPatcher/tree/master/docs
Redmi Pro Support:
https://github.com/chenxiaolong/DualBootPatcher/pull/707

Known issues:
- You tell me :D !

Credits:
@chenxiaolong for the awesome DualBootPatcher.

XDA:DevDB Information
[PATCHER][APP][OFFICIAL] Dualboot/Multiboot For Redmi Pro, Tool/Utility for the Xiaomi Redmi Pro

Contributors
yshalsager, chenxiaolong
Source Code: https://github.com/chenxiaolong/DualBootPatcher


Version Information
Status: Stable
Current Stable Version: 9.2.0.r295.g3b684238

Created 2017-08-19
Last Updated 2017-10-03
 

yshalsager

Recognized Developer
Oct 13, 2014
3,802
7,158
263
Cairo
xiaomifirmwareupdater.com
Notes

1- If flashing Custom ROM Fail (like LOS 14.1):
you have to edit "updater-script" and remove assert lines like:
Code:
assert(getprop("ro.product.device") == "omega" || getprop("ro.build.product") == "omega" || abort("E3004: This package is for device: omega; this device is " + getprop("ro.product.device") + "."););
ifelse(is_mounted("/system"), unmount("/system"));
2- To Flash AROMA ROMs flash patched zip from TWRP
 
Last edited:
  • Like
Reactions: daffa ZRN

daffa ZRN

Senior Member
Apr 6, 2017
78
14
0
1- If flashing Custom ROM Fail (like LOS 14.1):
you have to edit "updater-script" and remove assert lines like:

2- To Flash AROMA ROMs flash patched zip from TWRP
Pls help me when trying to patch my ROM (Los 13) it says that it need documents enabled from settings. The problem is I already have...

Please help me I'm very keen to be the first to try
 

daffa ZRN

Senior Member
Apr 6, 2017
78
14
0
1- If flashing Custom ROM Fail (like LOS 14.1):
you have to edit "updater-script" and remove assert lines like:

2- To Flash AROMA ROMs flash patched zip from TWRP

Pls help me when trying to patch my ROM (Los 13) it says that it need documents enabled from settings. The problem is I already have...

Please help me I'm very keen to be the first to try
Here are the screenshots
 

Attachments

daffa ZRN

Senior Member
Apr 6, 2017
78
14
0
-19/08/2017
Initial Release, waiting for adding officially :D
Ok now it works but when rebooting to enter secondary rom (using bootUI) it just boots to twrp.

I'm using resurrection remix as the secondary ROM, also when it's flashing (through the app) the message is red not green which means a fail. Maybe the that's the problem. Pls help so I can test it out and report back
 

yshalsager

Recognized Developer
Oct 13, 2014
3,802
7,158
263
Cairo
xiaomifirmwareupdater.com
Ok now it works but when rebooting to enter secondary rom (using bootUI) it just boots to twrp.

I'm using resurrection remix as the secondary ROM, also when it's flashing (through the app) the message is red not green which means a fail. Maybe the that's the problem. Pls help so I can test it out and report back
Yep red message means it didn't flash successfully. Can you take a look at second post? You need to remove assert lines
 

Ivan Torres

Member
Apr 18, 2017
31
2
0
Wow, dual boot patcher stops working when pressing ROMs, I am in a redmi note 3 pro kate, since version 277 no longer works but in 257 down function without errors, someone else happens to this?

Error log:

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Xiaomi/kate/kate:6.0.1/MMB29M/V8.2.4.0.MHRMIDL:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 13581, tid: 14315, name: pool-1-thread-1 >>> com.github.chenxiaolong.dualbootpatcher.snapshot <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xdeadbaad
Abort message: 'invalid address or address of corrupt block 0x7fa60f0090 passed to dlfree'
x0 0000000000000000 x1 0000007faf7ba7d0 x2 0000000000000001 x3 00000000007fabf9
x4 0000000000000000 x5 00000000deadbaad x6 0000000000000000 x7 0000000000000010
x8 7f7f7f7fffff7f7f x9 6471656b631f6e73 x10 7f7f7f7f7f7f7f7f x11 0101010101010101
x12 0000007faf7ba7c8 x13 58934240ef78b85e x14 58934240ef78b85e x15 0030f907887041ba
x16 0000007faf7b4a58 x17 0000000000000000 x18 0000007faca2a000 x19 0000007fa60f0090
x20 0000007faf7bb000 x21 0000007fa60f00a0 x22 0000007faf7bba70 x23 00000055995187e8
x24 0000000000000002 x25 0000005599529258 x26 0000000000000000 x27 0000000032e3dbe0
x28 00000055995a5860 x29 0000007f93a7f060 x30 0000007faf753580
sp 0000007f93a7f060 pc 0000007faf753588 pstate 0000000060000000

backtrace:
#00 pc 0000000000047588 /system/lib64/libc.so (dlfree+408)
#01 pc 00000000000195a8 /system/lib64/libc.so (free+20)
#02 pc 0000000000029054 /data/app/com.github.chenxiaolong.dualbootpatcher.snapshot-2/lib/arm64/libmbcommon.so
#03 pc 0000000000029224 /data/app/com.github.chenxiaolong.dualbootpatcher.snapshot-2/lib/arm64/libmbcommon.so
#04 pc 0000000000011b40 /data/app/com.github.chenxiaolong.dualbootpatcher.snapshot-2/lib/arm64/libmbcommon.so (_ZN2mb8format_vERSsPKcSt9__va_list+132)
#05 pc 000000000000abd0 /data/app/com.github.chenxiaolong.dualbootpatcher.snapshot-2/lib/arm64/libmbbootimg.so (_ZN2mb7bootimg6Reader11set_error_vESt10error_codePKcSt9__va_list+84)
#06 pc 0000000000009588 /data/app/com.github.chenxiaolong.dualbootpatcher.snapshot-2/lib/arm64/libmbbootimg.so (_ZN2mb7bootimg6Reader9set_errorESt10error_codePKcz+108)
#07 pc 000000000000d300 /data/app/com.github.chenxiaolong.dualbootpatcher.snapshot-2/lib/arm64/libmbbootimg.so
#08 pc 000000000000c96c /data/app/com.github.chenxiaolong.dualbootpatcher.snapshot-2/lib/arm64/libmbbootimg.so
#09 pc 0000000000009ed8 /data/app/com.github.chenxiaolong.dualbootpatcher.snapshot-2/lib/arm64/libmbbootimg.so (_ZN2mb7bootimg6Reader4openEPNS_4FileE+308)
#10 pc 0000000000009a88 /data/app/com.github.chenxiaolong.dualbootpatcher.snapshot-2/lib/arm64/libmbbootimg.so (_ZN2mb7bootimg6Reader13open_filenameERKSs+216)
#11 pc 0000000000011ec8 /data/app/com.github.chenxiaolong.dualbootpatcher.snapshot-2/lib/arm64/libmiscstuff-jni.so (Java_com_github_chenxiaolong_dualbootpatcher_nativelib_libmiscstuff_LibMiscStuff_getBootImageRomId+300)
#12 pc 0000000000603934 /data/app/com.github.chenxiaolong.dualbootpatcher.snapshot-2/oat/arm64/base.odex (offset 0x35c000)
 

Attachments

zhaodelin2002

Senior Member
Feb 18, 2016
77
20
0
I've use it for a long time,but i changed my model into Redmi Note 4(MTK) then I can use dualbootpatcher.now pro can use it with out changing model.it's great!:good:
 

daffa ZRN

Senior Member
Apr 6, 2017
78
14
0
Yep red message means it didn't flash successfully. Can you take a look at second post? You need to remove assert lines
Ok now I know how to remove those line and I did it, I removed the 1st and the 3rd line.

But now Im facing another fail on flash please help
 

Attachments

Status
Not open for further replies.