Skip to content
Patches Android ROMs for dual boot support
Branch: master
Clone or download
chenxiaolong Merge pull request #1437 from chenxiaolong/discontinued
DualBootPatcher is no longer in development
Latest commit 6fb7ac6 May 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.tx .tx: Update location to translation files Jan 20, 2019
Android_GUI Android GUI: Use java.lang.Class.getName() instead of getCanonicalName() Jan 26, 2019
android cmake: Add support for running tests in QEMU Jan 8, 2019
bootimgtool bootimgtool: Allow specifying multiple input formats Nov 28, 2018
cmake cmake: Remove procps-ng dependency Jan 31, 2019
data Add support for Samsung Galaxy Docomo J (#1210) Jun 25, 2018
devicesgen Use cloexec everywhere May 26, 2018
docker docker: Replace all local users with builder user Jan 30, 2019
docs docker: Replace all local users with builder user Jan 30, 2019
examples examples: Add sample frontend for libmbsystrace Jan 8, 2019
external external: RootShell: Update Android gradle plugin to 3.3.0 and target… Jan 19, 2019
gui libmbpatcher: Replace C callbacks with std::function Jun 8, 2018
hosttools libmbsystrace: Add headersgen tool for generating list of signal and … Dec 15, 2018
icons Use my legal name in all copyright headers Jan 18, 2015
libmbbootimg cmake: Add support for running tests in QEMU Jan 8, 2019
libmbcommon Merge pull request #1347 from chenxiaolong/libmbsystrace Jan 9, 2019
libmbdevice cmake: Add support for running tests in QEMU Jan 8, 2019
libmblog libmblog: Shorten tag by default Jul 2, 2018
libmbpatcher libmbpatcher: Fix incorrect add_file() overload being called Jun 13, 2018
libmbpio libmbpio: Use Outcome for error handling May 27, 2018
libmbsign cmake: Add support for running tests in QEMU Jan 8, 2019
libmbsparse cmake: Add support for running tests in QEMU Jan 8, 2019
libmbsystrace cmake: Add support for running tests in QEMU Jan 8, 2019
libmbutil libmbutil: Add function for writing an std::string_view to a file Feb 12, 2019
libmiscstuff-jni libmbcommon: Use bitmask to enable multiple formats and drop set_form… Nov 28, 2018
licenses licenses: Remove procps-ng license Jan 31, 2019
mbbootui cmake: Remove unneeded -Wl,--allow-multiple-definition since libandro… Jul 3, 2018
mbtool mbtool: sepolpatch.cpp: Fix MLS constraint handling for /data/media type Feb 13, 2019
misc cmake: Move static executable linking logic to separate function Jul 3, 2018
odinupdater libmbcommon: Remove unneeded includes from file.h Dec 12, 2018
protocol Android GUI: Switch from support libraries to androidx libraries Jan 19, 2019
signtool libmbsign: Rename mbsign.{cpp,h} to sign.{cpp,h} Jan 28, 2018
thirdparty DualBootPatcher is no longer in development May 18, 2019
utilities utilities: Don't download AROMA to build directory Jun 25, 2017
.gitignore .gitignore: Ignore makepkg signature files Dec 30, 2017
.gitmodules external: Update rapidjson submodule for improved schema validation e… Feb 3, 2018
CMakeLists.txt cmake: Add support for running tests in QEMU Jan 8, 2019
CONTRIBUTORS.md Update contributors Aug 11, 2014
Doxyfile Doxyfile: Add libmbsystrace directory Dec 15, 2018
LICENSE Add GPLv3+ license for the patcher and the respective license files f… May 19, 2014
README.md DualBootPatcher is no longer in development May 18, 2019

README.md

Due to recent changes in Android P, as well as upcoming changes in Android Q, DualBootPatcher is no longer being developed. These two releases change some fundamental assumptions that DBP makes about the host device.

With devices that ship with Android 9.0+, the system-as-root partition layout is mandatory. This means that the system partition includes everything that traditionally went in the boot image's ramdisk. DBP relies on being able to modify the ramdisk to add its binaries as well as some config files that specify the ROM ID and device specific information (eg. partitions). To switch between ROMs, DBP simply flashes the ROM's patched boot image.

With the system-as-root partition layout, most of the files could potentially live on the system partition, but the ROM ID must be stored in the boot image. With some devices, like Google Pixels, a ramdisk can be added back by including it in the boot image and patching the kernel image to ignore the skip_initramfs cmdline option. However, on other devices, like the Samsung Galaxy S10 series, the bootloader will always ignore the ramdisk section in the boot image. Storing the ROM ID in the cmdline field is also not feasible because many devices' bootloaders ignore the whole field.

With the Android Q preview builds, some devices, such as the Google Pixel 3 series, switched to using dm-linear for handling the partition layout of the read-only OS partitions (system, vendor, etc.). With this setup, a single GPT partition is split up and is mapped to device-mapper block devices by a userspace tool. With Android's /init, this is done via the liblp library, which parses the metadata on disk and configures dm-linear. DBP would have to implement something equivalent to this to be able to mount the Android partitions. It currently assumes that the kernel will provide a mountable block device after going throug the uevent device probing phase.

Neither of these changes are impossible to work around, but I have simply lost any interest in doing so. I have not used DBP on my primary devices for a couple of years now. Those interested in continuing development are free to fork the project. Any work that had been done for the 10.0.0 release has been pushed to the 10.0.0-staging branch.

All downloads have been moved to SourceForge at https://sourceforge.net/projects/dualbootpatcher/files/. I will work on splitting out some of the more useful parts of DBP, such as libmbbootimg (boot image parser) and libmbsystrace (syscall injection/modification library), so that they can be used in other projects, but DBP itself will no longer be developed.

Huge thanks to everyone who helped out with this project the past six years!


Downloads

All previous builds can be found here.

Compiling from Source

See the docs/build/ directory for instructions on building for Linux, Windows, and Android.

License

The patcher is licensed under GPLv3+ (see the LICENSE file). Third party libraries and programs are used under their respective licenses. Copies of these licenses are in the licenses/ directory of this repository. Patches and other source code modifications to third party software are under the same license as the original software.

You can’t perform that action at this time.