A huge thanks goes out to all of the donators for supporting this project!
- Christopher Edwards
- Dang Lee
- Gerard Worster
- Matthew Smith
- Shahzain Badruddin
- John Nguyen
- Marcos Shrem
- John West
- Oliver Madden
- Cody Wells
- 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
NOTE: If you want to dualboot a TouchWiz ROM, I highly recommend installing TW as the primary ROM. Otherwise, any mods will need to be patched before flashing.
It is very easy to add support for other kernels and ROMs. Let me know if you want support for another kernel or ROM :)
- CyanogenMod ROMs
- Official CyanogenMod nightlies
- CyanogenMod-based ROMs
- HellyBean / HellKat
- BAM Android
- Smasher X
- AOKP ROMs
- Official AOKP ROMs
- IceColdJelly (Vertigo)
- Dirty Unicorns
- PAC-Man ROMs
- Official PAC-Man
- Google Edition ROMs
- ParanoidAndroid ROMs
- MIUI (official)
- MIUI (unofficial - miuiandroid)
- MIUI (Tquetski)
- Slim Bean
- AOSP (Broodplank)
- TouchWiz ROMs
- Evil UnWizzed
- iNTriNsiC (20130806 version)
- Sense 5 Port (geiti94) (Version 2)
- ktoonsez (AOSP, Google Edition, & TouchWiz)
- faux123 (AOSP & Google Edition)
- ChronicKernel jb43 AOSP
- Infamous kernel
- Ausdim kernel
- Adam kernel
- Alucard kernel (AOSP, Google Edition, & TouchWiz)
- Echoe AEL (Google Edition)
- GoogyMax3 (CyanogenMod, Google Edition, & TouchWiz)
- Plain boot.img files (use useful/patch-ramdisk.bat script)
- Google Apps for Official AOKP
- Google Apps for Task650's AOKP
- Google Apps for CyanogenMod and PAC-Man
- Google Apps for Slim Bean (standard and AROMA)
- Google Apps for Paranoid Android
- Google Apps for Gummy
- Google Apps from BaNkS
- Google Apps from doomed151 for AOSP
- Xposed disabler
- 3Minit framework
How to use the patcher
Download the patcher apk and run it. It's very straight forward--only has one button to press ;)
Double click PatchFileWindowsGUI.exe or drag the zip file you want to patch onto that file.
If it complains about msvcr100.dll missing, you'll need to install this: http://www.microsoft.com/en-us/downl...s.aspx?id=8328
Make sure you have PyQt5 for Python 3 installed. This is the "python3-pyqt5" package on Debian and Ubuntu and "python-pyqt5" on Arch Linux. Then, double click PatchFileLinuxGUI or drag the zip file you want to patch onto that file.
The GUI is not supported on OS X yet. You can probably run the Windows version under Wine or Crossover though. Otherwise, you can use the command line version.
Windows (command line)
Drag the file you want to patch onto PatchFileWindows.exe
Linux or Mac (command line)
Change to the patcher's directory and run:
After patching the zip file, a new file_dualboot.zip file will be created. For example, patching ktoonsez's
would create a new
Instructions for dual booting
Before doing anything, download the Dual Boot Patcher app and the DualBootUtilities.zip from the download section below.
Note: Only the secondary ROM and other zips that should be installed for the secondary ROM need to be patched. Nothing needs to be done for the primary ROM.
- Boot into your primary ROM and install the Dual Boot Patcher app
- Open the app and set the current kernel as the primary kernel (screenshot)
- If the primary ROM is TouchWiz, you will need to remove some bloatware. Otherwise, two ROMs won't be able to fit on the /system partition. You can also convert some system apps to user apps with this tool: https://play.google.com/store/apps/d...appmover&hl=en
- Patch the ROM (see the "How to use the patcher" section)
- Reboot into recovery
- Flash the patched zip files.
- Install the Dual Boot Patcher app again in the secondary ROM. If you have a locked bootloader, set the kernel for the secondary ROM (just in case).
A normal backup from recovery will backup every ROM. If you would like to back up ROMs individually, please see @rlorange's awesome tool: http://forum.xda-developers.com/show....php?t=2491299
How do I...?
- Switch the ROM if something doesn't work properly?
- Flash DualBootUtilities.zip. You will get a menu allowing you to switch to the primary or secondary ROM.
- Wipe /cache, /data, /system, or dalvik-cache?
- Flash DualBootUtilities.zip. You will get a menu that lets to wipe the respective partitions for either the primary or the secondary ROM.
- It's important to not use the recovery's built-in wiping functions because they may delete files needed for the secondary ROM.
- Update the primary ROM?
With version 8.0.0, the primary ROM can be patched so that it doesn't wipe the other ROMs when flashed. It also automatically sets the primary kernel. That is, most likely, the easiest method. The zip can also be manually edited by following the instructions below.
- Edit META-INF/com/google/android/updater-script so that it does not format /system or /dev/block/mmcblk0p16 (because the 16th partition is /system)
- Flash DualBootUtilities.zip before updating the ROM and choose Wipe Primary /system. If the primary ROM is AOSP-based, you will need to reflash Gapps.
- Download the two zips here and flash the appropriate one before and after the primary ROM's zip: http://d-h.st/users/chenxiaolong/?fld_id=30845#files
- Make sure to set the kernel as primary in the Dual Boot Patcher app
- Alternative: Just flash the update as normal and then reflash the secondary ROM. It's a bit tedious, but it works and you won't lose any files/settings.
- Update the secondary ROM?
- Just patch the new zip and flash it
- Flash a mod or custom kernel for the primary ROM?
- Just flash it :)
- If it's a custom kernel, make sure you set it in the Dual Boot Patcher app
- Flash a mod or custom kernel for the secondary ROM?
- If it's a custom kernel, just patch and install it.
- If it's a mod or some other flashable zip, see the "How do I patch a zip file manually?" section.
How do I patch a zip file manually?
(My patches for the supported zips above can be found [here] if you'd like to see examples of how this is done)
Note: This has not been updated for version 3.0.0 of the patcher yet. The instructions below will still work, but auto-patching is a lot simpler.
The first thing to do is to download the dual boot helper script and place it at the base of the zip file (not in a subfolder): https://github.com/chenxiaolong/Dual...es/dualboot.sh
Next edit the updater-script file: META-INF/com/google/android/updater-script and put the following lines at the top. This allows the helper script to be used.
package_extract_file("dualboot.sh", "/tmp/dualboot.sh"); set_perm(0, 0, 0777, "/tmp/dualboot.sh");
If see lines like one of the below:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system"); OR mount("ext4", "EMMC", "/dev/mmcblk0p16", "/system"); OR run_program("/sbin/busybox", "mount", "/system");
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
unmount("/system"); OR run_program("/sbin/busybox", "umount", "/system");
run_program("/tmp/dualboot.sh", "set-multi-kernel"); run_program("/tmp/dualboot.sh", "unmount-system");
You will see something like this. Just choose the ROM/Kernel type (AOSP, Google Edition, or TouchWiz) and press Enter.
That's it! If it seems like a lot of work, you'll get the hang of it soon. The idea is to change the mount, format, and unmount operations so that they don't affect the primary ROM. Then the ramdisk is modified so that the needed files are loaded from the new locations.
I patched it manually and it worked! How do I include it in the patcher?
First of all, thanks for helping to add support for more ROMs! To include support for the ROM, I need two things: a patch and what I call a "patch info" file.
Generating a patch is easy. Make sure you have the original and modified files in the same directory structure as in the zip. You should have:
where 'a' has the original files and 'b' has the modified files. (Of course, you can name the two folders whatever you want)
If you're on Windows, just drag both 'a' and 'b' folders onto useful/generate-patch.bat that's included with the patcher.
If you're on Linux or Mac, just run:
./useful/generate-patch.sh /path/to/a /path/to/b
That's it! Just send me those two files and I'll include them in the next release :)
I recommend against using the stable version of the patcher right now. So many changes have been made in regards to device support, ROM support, and general bug fixes that it's better to use the unstable snapshot builds until the next stable release is made.
Donations are not required, but are greatly appreciated :D Donators will have their names listed in a nice big font on this post and will also be listed in the README file of the patcher.
My dual boot patcher: https://github.com/chenxiaolong/DualBootPatcher
My dual boot zips: https://github.com/chenxiaolong/DualBootZips
How to compile the app?
Please see https://github.com/chenxiaolong/DualBootPatcher for up-to-date instructions on compiling the patcher.
How to rebuild the helpful zips?
Do it manually! Just kidding ;)
Dual Boot Patcher, Tool/Utility for the Samsung Galaxy S 4
Last Updated 2014-07-29