Skip to content

.github/workflows/recovery.yml #37

.github/workflows/recovery.yml

.github/workflows/recovery.yml #37

Workflow file for this run

name: RECOVERY
on:
workflow_dispatch:
inputs:
RECOVERY_URL:
description: 'RECOVERY URL'
required: true
default: 'https://transfer.sh/(RECOMMENDED)'
env:
RECOVERY_URL: https://oshi.at/Rpjg
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out
uses: actions/checkout@main
- name: Prepare the environment
run: |
sudo apt install git wget lz4 tar openssl python3 -y
- name: Fetch image from URL
run: |
ls
pwd
wget ${{github.event.inputs.RECOVERY_URL }}
- name: Patch Process-1
run: |
chmod a+x script1.sh
chmod a+x magiskboot
./script1.sh || true
- name: Patch Process-2
run: |
chmod a+x script2.sh
./script2.sh || true
python3 avbtool extract_public_key --key phh.pem --output phh.pub.bin
python3 avbtool add_hash_footer --partition_name recovery --partition_size $(wc -c recovery.img |cut -f 1 -d ' ') --image recovery-patched.img --key phh.pem --algorithm SHA256_RSA4096
mkdir output && cd output
mv ../recovery-patched.img recovery.img
tar cvf fastbootd-recovery.tar recovery.img
- name: Upload Recovery
uses: actions/[email protected]
with:
path: /home/runner/work/Patch-Recovery/Patch-Recovery/output/*.tar
name: Patched-Recovery