• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[MOD] [OFFICIAL] Dual Boot Patcher [SNAPSHOT] [KENZO]

Search This thread

vinayak.s19

Senior Member
Oct 14, 2016
110
56
Chennai
logo.png

Dual Boot Patcher
Supports all Android Versions
(Even MIUI works)

/*
* Your warranty is now void.
*
* We're 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 us for messing up your device, we will laugh at you.
*
*/

What is Dual Boot Patcher?
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 136 supported devices and their variations.

**I am not the developer of this MOD. The credit for this goes to the actual developer of this MOD.**

Download:
https://dbp.noobdev.io/downloads/

BUGS:
  1. No BOOT UI support yet.
  2. Lock screen shows incorrect pattern every time after installing other ROMs.(Patch below)

**Don't forget to put screen lock to slide or none before booting to other ROMs as it will not allow you to unlock your device on the lock screen after you reboot to another ROM. Even if you enter the correct pattern, it will show that it's wrong(more about the lock screen patch below). Please read the "Lock Screen Patch" Section below before starting the procedure.

Procedure:
  1. Download the APP and the Utilities ZIP from the link.
  2. Install the APP.
  3. Set/Update the kernel when asked.
  4. Choose "Patch Zip File" from the left pane.
  5. Choose "Add flashable zip" by clicking on the "+" button.
  6. Select ROM installation directory in the Partition configuration. (Data Slot/Extsd slot recommended)
  7. Select the location for the patched image file.
  8. Add GAPPS and kernel (more about kernel flashing below) files as needed.
  9. Go to the ROMs section from the left pane and select In App Flashing(bottom right corner).
  10. Choose Add patched file by clicking on the "+" button.
  11. Select the patched Zip files and accordingly select "keep location" or "change location".
  12. Go ahead and flash the ZIPs.
  13. Now you can choose between the installed ROMs and select which one to boot from.
  14. You can also share your apps among your ROMs using the "App Sharing" menu in the left pane.(Note that once you select apps for sharing, the app data will be wiped for those apps once.)
The Utilities ZIP is a flashable zip in the recovery which is based on AROMA installer which provides basic dual boot system modification tools like changing the current boot ROM or wiping a ROM etc. It is very useful when your device is in boot loop or you want to change your boot ROM using the recovery.

YouTube Tutorial:
https://youtu.be/T44ifBaHAWs

MIUI:
  1. As MIUI encrypts data partition, ROMs on it won't be able to boot up.
  2. Follow this guide to make data partition accessable.
  3. Then install other ROMs as usual on the data-slot.

Kernel Flashing:
  1. Flashing ZIPs based on AROMA installer is not allowed via "In App Flashing".
  2. Patch the Kernel ZIPs by selecting the exact installation location of the kernel in the Dual Boot Patcher App.
  3. Then flash the patched ZIPs in the Custom Recovery.

Lock Screen Patch:
  1. Booting to other ROMs might not allow you to unlock your device on your first ROM. Either set your lock to none or swipe or follow the instructions below.
  2. Download Agni Toolbox.
  3. Remove lock screen security.
  4. If your non-primary ROM is locked, then patch the Agni Toolbox and then remove security.

Current Status:
MIUI works but only as primary ROM and only with Alka TWRP recovery.

Contributors:
Dual Boot Patcher Team
Source Code: GitHub
@psndna88 for Agni Toolbox.
@srijansaxena11 for YouTube Tutorial.

Version Information:
Status: Sanpshot

Created: 2016-12-31
Last Updated: 2016-12-31
 
Last edited:

NVDX11

Senior Member
May 10, 2013
238
223
26
Bharuch,Gujarat
There is some problem with app,whenever i try to flash rom in background as soon as i switch to the app from recents it crashes.
@rocknegi haven't tested Miui,So don't know.
 
Last edited:

vinayak.s19

Senior Member
Oct 14, 2016
110
56
Chennai
There is some problem with app,whenever i try to flash rom in background as soon as i switch to the app from recents it crashes.
@rocknegi haven't tested Miui,So don't know.

My zip patching don't work always patched zip 0b

In App Flashing and Patching both won't work in background as the mbtool works only in foreground till now. Keep the app open. The Dual Boot Patcher's background service is still not completely bug free.
 

Filip013

Senior Member
Oct 25, 2011
360
104
I can’t make this mod work with MIUI as the primary ROM. When I try to boot a secondary ROM, I always end up in recovery. I tried unofficial LineageOS by minz1 and AOSP by JDCTeam.

Edit: I never had any problems booting back into MIUI. My PIN is still fine.

Edit 2: It might be worth noting that I’m using the latest official Global Developer ROM and ZCX TWRP. Perhaps, it would work with a Xiaomi.EU ROM and the official TWRP.

Edit 3: Nope, it doesn’t work with a Xiaomi.EU ROM either. I also tried using the last CM13 nightly build as a secondary ROM with no luck. So I don’t think it’s possible to use DualBootPatcher with MIUI as the primary ROM. What a pity.
 
Last edited:
  • Like
Reactions: ViVi93

rocknegi

Senior Member
Dec 2, 2013
863
972
24
delhi
Dual boot patcher for Armani works for MIUI as primary and any other ROM as secondary :3
Maybe see what that dev did
 

sarveshrulz

Senior Member
Dec 23, 2015
613
649
Mumbai
I can’t make this mod work with MIUI as the primary ROM. When I try to boot a secondary ROM, I always end up in recovery. I tried unofficial LineageOS by minz1 and AOSP by JDCTeam.

Edit: I never had any problems booting back into MIUI. My PIN is still fine.

Edit 2: It might be worth noting that I’m using the latest official Global Developer ROM and ZCX TWRP. Perhaps, it would work with a Xiaomi.EU ROM and the official TWRP.

Edit 3: Nope, it doesn’t work with a Xiaomi.EU ROM either. I also tried using the last CM13 nightly build as a secondary ROM with no luck. So I don’t think it’s possible to use DualBootPatcher with MIUI as the primary ROM. What a pity.
Use multirom miui 8 as it has system image and probably don't use cust, and in twrp it doesn't shows no os installed while booting so plz try
 

rocknegi

Senior Member
Dec 2, 2013
863
972
24
delhi
Save option isn't available
Can't click on it ;_;
 

Attachments

  • Screenshot_2017-01-01-19-33-51-104_com.android.documentsui.png
    178 bytes · Views: 1,172

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    logo.png

    Dual Boot Patcher
    Supports all Android Versions
    (Even MIUI works)

    /*
    * Your warranty is now void.
    *
    * We're 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 us for messing up your device, we will laugh at you.
    *
    */

    What is Dual Boot Patcher?
    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 136 supported devices and their variations.

    **I am not the developer of this MOD. The credit for this goes to the actual developer of this MOD.**

    Download:
    https://dbp.noobdev.io/downloads/

    BUGS:
    1. No BOOT UI support yet.
    2. Lock screen shows incorrect pattern every time after installing other ROMs.(Patch below)

    **Don't forget to put screen lock to slide or none before booting to other ROMs as it will not allow you to unlock your device on the lock screen after you reboot to another ROM. Even if you enter the correct pattern, it will show that it's wrong(more about the lock screen patch below). Please read the "Lock Screen Patch" Section below before starting the procedure.

    Procedure:
    1. Download the APP and the Utilities ZIP from the link.
    2. Install the APP.
    3. Set/Update the kernel when asked.
    4. Choose "Patch Zip File" from the left pane.
    5. Choose "Add flashable zip" by clicking on the "+" button.
    6. Select ROM installation directory in the Partition configuration. (Data Slot/Extsd slot recommended)
    7. Select the location for the patched image file.
    8. Add GAPPS and kernel (more about kernel flashing below) files as needed.
    9. Go to the ROMs section from the left pane and select In App Flashing(bottom right corner).
    10. Choose Add patched file by clicking on the "+" button.
    11. Select the patched Zip files and accordingly select "keep location" or "change location".
    12. Go ahead and flash the ZIPs.
    13. Now you can choose between the installed ROMs and select which one to boot from.
    14. You can also share your apps among your ROMs using the "App Sharing" menu in the left pane.(Note that once you select apps for sharing, the app data will be wiped for those apps once.)
    The Utilities ZIP is a flashable zip in the recovery which is based on AROMA installer which provides basic dual boot system modification tools like changing the current boot ROM or wiping a ROM etc. It is very useful when your device is in boot loop or you want to change your boot ROM using the recovery.

    YouTube Tutorial:
    https://youtu.be/T44ifBaHAWs

    MIUI:
    1. As MIUI encrypts data partition, ROMs on it won't be able to boot up.
    2. Follow this guide to make data partition accessable.
    3. Then install other ROMs as usual on the data-slot.

    Kernel Flashing:
    1. Flashing ZIPs based on AROMA installer is not allowed via "In App Flashing".
    2. Patch the Kernel ZIPs by selecting the exact installation location of the kernel in the Dual Boot Patcher App.
    3. Then flash the patched ZIPs in the Custom Recovery.

    Lock Screen Patch:
    1. Booting to other ROMs might not allow you to unlock your device on your first ROM. Either set your lock to none or swipe or follow the instructions below.
    2. Download Agni Toolbox.
    3. Remove lock screen security.
    4. If your non-primary ROM is locked, then patch the Agni Toolbox and then remove security.

    Current Status:
    MIUI works but only as primary ROM and only with Alka TWRP recovery.

    Contributors:
    Dual Boot Patcher Team
    Source Code: GitHub
    @psndna88 for Agni Toolbox.
    @srijansaxena11 for YouTube Tutorial.

    Version Information:
    Status: Sanpshot

    Created: 2016-12-31
    Last Updated: 2016-12-31
    3
    There is some problem with app,whenever i try to flash rom in background as soon as i switch to the app from recents it crashes.
    @rocknegi haven't tested Miui,So don't know.

    My zip patching don't work always patched zip 0b

    In App Flashing and Patching both won't work in background as the mbtool works only in foreground till now. Keep the app open. The Dual Boot Patcher's background service is still not completely bug free.
    3
    Thanks :)

    I did have a little tinker/explore and unpacked the system.new.dat for the Xiaomi.eu ROM. I was tempted to see if I can make a barebones install of MIUI but trimming out the safe-to-remove apks from priv-app/app only cut things down a bit. From what I can remember MIUI apps tend to all delicately work together. Think a lot of trial and error would be needed to get MIUI booting/functioning on the bare basic resources for the sake of flash space.
    See this
    http://en.miui.com/thread-375063-1-1.html

    Kenzo se type kiya h
    3
    Would be nice if you can share your updater-script :D

    Remove this too
    Code:
    [COLOR="DarkRed"]get_device_compatible("kenzo") == "OK" || abort("This package is for \"kenzo\" devices; this is a \"" + getprop("ro.product.device") + "\".");
    ui_print("Target: Xiaomi/kenzo/kenzo:6.0.1/MMB29M/7.2.9:user/release-keys");
    show_progress(0.100000, 2);
    mount("ext4", "EMMC");
    set_metadata_recursive("uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
    show_progress(0.200000, 10);[/COLOR]

    package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");

    And this too
    Code:
    [COLOR="darkred"]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, 145);[/COLOR]

    ui_print("Patching system image unconditionally...");
    block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
    ui_print("Verifying the updated system image...");
    if range_sha1("/dev/block/bootdevice/by-name/system", "78,0,32770,32929,32931,33439,65535,65536,65538,66046,98303,98304,98306,98465,98467,98975,131071,131072,131074,131582,163839,163840,163842,164001,164003,164511,196607,196608,196610,197118,229375,229376,229378,229537,229539,230047,262143,262144,262146,262654,294911,294912,294914,295073,295075,295583,327679,327680,327682,328190,360447,360448,360450,360958,393215,393216,393218,393726,425983,425984,425986,426494,444771,458752,458754,491520,491522,524288,524290,557056,557058,589824,589826,622592,622594,623102,650190,650191,655320") == "a5cbfacbe6c154ea15f42443934d455779e0e414" then
    if range_sha1("/dev/block/bootdevice/by-name/system", "88,32770,32929,32931,33439,65535,65536,65538,66046,98303,98304,98306,98465,98467,98975,131071,131072,131074,131582,163839,163840,163842,164001,164003,164511,196607,196608,196610,197118,229375,229376,229378,229537,229539,230047,262143,262144,262146,262654,294911,294912,294914,295073,295075,295583,327679,327680,327682,328190,360447,360448,360450,360958,393215,393216,393218,393726,425983,425984,425986,426494,444771,445283,458240,458752,458754,459266,491008,491520,491522,492034,523776,524288,524290,524802,556544,557056,557058,557570,589312,589824,589826,590338,622080,622592,622594,623102,650190,650191") == "f90b76029652efc3cbe367d5f1de7bf247647d31" then
    ui_print("Verified the updated system image.");
    else
    abort("system partition has unexpected non-zero contents after OTA update");
    endif;
    else
    abort("system partition has unexpected contents after OTA update");
    endif;
    show_progress(0.100000, 2);


    It will look like this
    package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");

    ui_print("Patching system image unconditionally...");
    block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
    ui_print("Verifying the updated system image...");
    if range_sha1("/dev/block/bootdevice/by-name/system", "78,0,32770,32929,32931,33439,65535,65536,65538,66046,98303,98304,98306,98465,98467,98975,131071,131072,131074,131582,163839,163840,163842,164001,164003,164511,196607,196608,196610,197118,229375,229376,229378,229537,229539,230047,262143,262144,262146,262654,294911,294912,294914,295073,295075,295583,327679,327680,327682,328190,360447,360448,360450,360958,393215,393216,393218,393726,425983,425984,425986,426494,444771,458752,458754,491520,491522,524288,524290,557056,557058,589824,589826,622592,622594,623102,650190,650191,655320") == "a5cbfacbe6c154ea15f42443934d455779e0e414" then
    if range_sha1("/dev/block/bootdevice/by-name/system", "88,32770,32929,32931,33439,65535,65536,65538,66046,98303,98304,98306,98465,98467,98975,131071,131072,131074,131582,163839,163840,163842,164001,164003,164511,196607,196608,196610,197118,229375,229376,229378,229537,229539,230047,262143,262144,262146,262654,294911,294912,294914,295073,295075,295583,327679,327680,327682,328190,360447,360448,360450,360958,393215,393216,393218,393726,425983,425984,425986,426494,444771,445283,458240,458752,458754,459266,491008,491520,491522,492034,523776,524288,524290,524802,556544,557056,557058,557570,589312,589824,589826,590338,622080,622592,622594,623102,650190,650191") == "f90b76029652efc3cbe367d5f1de7bf247647d31" then
    ui_print("Verified the updated system image.");
    else
    abort("system partition has unexpected non-zero contents after OTA update");
    endif;
    else
    abort("system partition has unexpected contents after OTA update");
    endif;
    show_progress(0.100000, 2);


    miui_HMNote3ProGlobal_7.1.19_c69232a25b_6.0 updater-script attached.
    3
    @Sudeep Duhoon
    Would like to use MIUI in Data-Slot also :) .
    Looking for a tutorial I found this : https://forum.xda-developers.com/mi...patcher-xiaomi-mi-max-hydrogen-t3491485/page5

    It is not for Kenzo but do you think we can use it for our device, or do you have an easier way ?

    Thanks for any help :)
    That's a lot of work. I'll tell what I did at 2:30, I am out right now. Screenshot_20170215-134418.png

    Kenzo se type kiya h