Skip to content

A bash script that utilizes avbtool & magiskboot to patch recovery images of dynamic samsung devices with android 10 and above to enable fastbootd.

License

Notifications You must be signed in to change notification settings

hdk2d/fastboot-patcher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastboot-patcher

Halt! Read this first:

This repository is basically a updated version of Johx22/Patch-Recovery
Which is then based off of this script: phhusson/samsung-galaxy-a51-gsi-boot
The workflow is fixed, the scripts have been combined and revamped, etc.
All credit still goes to them.

Instructions for patching!

In github (using Github Actions)

Note: to use github actions, you need to fork this repository first, and also if using any other filehost than transfer.sh, please check if you can download the image using wget - do not open an issue if you haven't checked the link and made sure your image was not corrupted yourself (you can use the workflow logs to see that)

Upload recovery.img (not recovery.img.lz4) to a file host website like this,
go over to the Actions tab on your fork, select Patch Image via URL and click Run Workflow. It should open up a little window that allows you to enter a link, paste the file host link for your recovery image there (e.g. https://transfer.sh/xxxxxx/recovery.img)
Click Run Workflow again to start the process, and when it's done you should have 2 files available to download - 1 being the keys, of which signifigance I'm not sure myself, and the other will hold your patched recovery image, and a version of it that you can use for odin.

Natively (Arch/Debian)

Note: you're going to need the packages (git, wget, lz4, tar, openssl, & python3) available in your terminal,
and recovery.img.lz4 or recovery.img. Personally, I unzipped the AP archive of a stock rom and got my recovery image from that. Also, patcher-minimal has a bunch of workarounds for the workflow, so I'm not sure how good of an idea it'd be to run that instead of patcher locally.

If you have those, then clone the repository, and move your recovery image to it.

git clone github.com/engineer4t/fastboot-patcher.git && mv recovery.img.lz4 ./fastboot-patcher/ && cd fastboot-patcher

Then, just simply run the script with this command and wait for it to finish, it shouldn't take longer than a minute.

chmod a+x ./magiskboot && chmod a+x ./patcher && ./patcher

You'll find the original recovery image and 2 new images (.img and .tar.md5 for odin) in the top directory if successful.

About

A bash script that utilizes avbtool & magiskboot to patch recovery images of dynamic samsung devices with android 10 and above to enable fastbootd.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.0%
  • Shell 5.0%