GitXplorerGitXplorer
p

NoiceDualBootPatcher

public
13 stars
3 forks
0 issues

Commits

List of commits on branch master.
Unverified
48c32d7b8bf6e06c70842fea0227f1ce7db32b02

Hopeful fix for non-huawei

ppenn5 committed 6 years ago
Unverified
05b55f86af3ca441da462e9aeefb2a26592fcc4e

Add bugs

ppenn5 committed 6 years ago
Unverified
ced8536b9b74bb836dd2b36ef8311fbc4a3f5fde

Fix tiny issue with devices that have DTB's

ppenn5 committed 6 years ago
Unverified
b31c8d7a77d5726114d41725798f1090218887e6

Revert "Set theme jekyll-theme-minimal"

ppenn5 committed 6 years ago
Unverified
50daba3bd36cd00305d5cdae9e2b9e75e84640d3

Mini-fixup

ppenn5 committed 6 years ago
Unverified
35cf5ff7aeb55eb3bd4d7dba912fdf7d1a640d47

Add Docs

ppenn5 committed 6 years ago

README

The README file for this repository.

NoiceDualBootPatcher

This is a collection of scripts that will patch your ramdisk (part of the kernel) to allow you do dualboot your Android phone.

Working

  • It boots and works correctly on my Project Treble phone on both Oreo and Pie
  • You can install magisk over the patched ramdisk, and it works.
  • Android works and no noticable bugs are created

Known Bugs

  • Bluetooth pairings are lost every time you switch data (Needs Confirmation)
  • On some weird devices (that don't conform to google specs) there is a risk that the boot.img requires AVB to work. This is also the case on Huawei's patch01 if I understand correctly. Currently, the system will simply pad the AVB field with nulls. This means that the checksum will fail if your device has a non-null AVB field (aka stock, unpatched boot.img). This will be fixed in a later release, as it will fail the checksum check.

Usage

  1. Clone this repo
  2. Get the file containing your ramdisk from the phone or stock rom and put it in this folder with the name boot.img
  3. make
  4. Run as either fakeroot (unsupported) or root (either sudo or su): python3 main.py
  5. The output will be generated in boot.img-repack
  6. Copy this file to the phone and flash it to the same partition it came from. Various checks are conducted to ensure it won't brick the phone.
  7. Wipe data and cache in TWRP
  8. Reboot!

Installing a dual system

https://github.com/penn5/DualBootInstaller will do it automatically.

  1. Download the zip file for the system
  2. Extract it.
  3. If there are any .br files, extract them too (brotli)
  4. Use https://github.com/xpirt/sdat2img to covert it to a system.img
  5. Send this system.img to the phone
  6. Enter the twrp shell (Advanced --> Terminal) and run (replacing paths with the correct ones) rm -rf /mnt/tmp;mkdir /mnt/tmp;mount -o loop -t auto /path/to/system.img /mnt/tmp
  7. Exit the twrp shell and enter File Manager
  8. Navigate to /mnt/tmp
  9. Click the blue folder icon in the bottom right corner.
  10. Select 'Copy'
  11. Navigate to /system/(a|b) (make the folder if it doesn't exist)
  12. Click the blue folder icon again and paste the files. This will take a while.
  13. Reboot System!

Getting Logs

  • If it is booting, get /dev/mounts - this is a tmpfs with all the logs in
  • If it isn't booting, send the ramdisk folder relative to this file.