Coder Social home page Coder Social logo

penn5 / noicedualbootpatcher Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 3.0 8.4 MB

This is the Nice Dual Boot Patcher

Home Page: https://penn5.github.io/NoiceDualBootPatcher

Makefile 0.82% C 81.67% Shell 9.18% Java 4.96% Python 3.36%
android dualboot

noicedualbootpatcher's Introduction

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.

noicedualbootpatcher's People

Contributors

penn5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

noicedualbootpatcher's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.