• Stars
    star
    511
  • Rank 83,560 (Top 2 %)
  • Language
    C++
  • License
    Other
  • Created over 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Patches Android ROMs for dual boot support

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.

More Repositories

1

BCR

A Basic Call Recorder for rooted Android devices
Kotlin
594
star
2

Unity-for-Arch

Porting Ubuntu's Unity Shell to Arch Linux
Shell
163
star
3

avbroot

Maintain Android Verified Boot using a custom key while rooted with Magisk
Python
73
star
4

Debian-Packages

Packaging files for Debian packages
Shell
55
star
5

ipmi-fan-control

Rust
30
star
6

Unity-for-Arch-Extra

Extra stuff for the Unity-for-Arch project
Shell
25
star
7

DualBootZips

Shell
22
star
8

aosproot

Apply Magisk boot image patch during AOSP build
Python
17
star
9

UnityNext-for-Arch

Project for porting Mir and Unity 8/Next to Arch Linux
8
star
10

deodexer

Python
8
star
11

Unity-for-Fedora

Porting Ubuntu's Unity Shell to Fedora
Shell
6
star
12

ArchLinux-Packages

Packages for Arch Linux (some in AUR)
Shell
5
star
13

dotfiles

My precious!
Shell
5
star
14

keystrings-decrypter

Simple decryption tool for TouchWiz keystrings.dat files
Python
5
star
15

RSAF

An Android Storage Access Framework document provider for rclone
Kotlin
5
star
16

Knoxify

Magisk module to enable KNOX features in TouchWiz ROMs
Shell
4
star
17

Fedora-SRPMS

Just some SRPMS for Fedora that I made
Shell
4
star
18

BCP

A tech demo to play audio to the other party in a phone call
Kotlin
3
star
19

libaxmlparser

Subset of AOSP's libandroidfw for parsing Android's binary XML files
C++
3
star
20

jellyfin-ffmpeg-fedora

Unofficial Fedora packaging scripts for jellyfin-ffmpeg
2
star
21

ddns-updater

A simple RFC 2136 dynamic DNS updater
Rust
2
star
22

samfusdl

Rust
2
star
23

DualBootSwitcher

Java
2
star
24

fedora-encrypted-boot

Patch for Anaconda installer to allow installing Fedora with an encrypted /boot volume
2
star
25

Note4Kernel

C
1
star
26

beatsaber-overlay

Web-based overlay for Beat Saber
JavaScript
1
star
27

edp-psr-hack

A hacky kernel module to force enable PSR on the internal eDP display
C
1
star
28

avbroot-inc-ota

Proof-of-concept tool to generate an Android incremental OTA from two full OTAs
Rust
1
star
29

parrotize

Python
1
star
30

ndk_cmake_3.9_test

Shell
1
star
31

AUR-Files

1
star
32

selinux

C
1
star
33

neuteredsaf

Heavily stripped down version of Android's DocumentsUI for pre-KitKat
Java
1
star
34

PMAiT-Wine

Running Pac-Man Adventures in Time in Wine
Python
1
star
35

rtmp2hls

Dockerfile
1
star
36

ndk_filesystem_test

Shell
1
star
37

Unity-for-Arch-LiveCD

Shell
1
star
38

aradiabot

An IRC bot based off the PircBotX API
Java
1
star
39

svrbsctl

Simple tool to control the operating state of SteamVR 2.0 Base Stations
Rust
1
star
40

sslkeyfinder

Search a broken disk or another input file for SSL private keys
C
1
star
41

zipunsplit

A tool for joining split zip files
Rust
1
star