Skip to content

Commit

Permalink
Update script2.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jwagnervaz authored Oct 16, 2022
1 parent 9311f4d commit 442d641
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions script2.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#!/bin/bash


if [ -f YVdq ];then
lz4 -B6 --content-size -f YVdq recovery2.img
if [ -f recovery.img.lz4 ];then
lz4 -B6 --content-size -f recovery.img.lz4 recovery.img
fi

off=$(grep -ab -o SEANDROIDENFORCE recovery.img |tail -n 1 |cut -d : -f 1)
dd if=recovery2.img of=recovery.img bs=4k count=$off iflag=count_bytes
dd if=recovery.img of=r.img bs=4k count=$off iflag=count_bytes

if [ ! -f phh.pem ];then
openssl genrsa -f4 -out phh.pem 4096
fi

mkdir unpack
cd unpack
../magiskboot unpack ../recovery.img
../magiskboot unpack ../r.img
../magiskboot cpio ramdisk.cpio extract
# Reverse fastbootd ENG mode check
~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery e10313aaf40300aa6ecc009420010034 e10313aaf40300aa6ecc0094 # 20 01 00 35
Expand All @@ -29,5 +29,5 @@ cd unpack
~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 24f0fcee30b1681c 24f0fcee30b9681c
~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 27f02eeb30b1681c 27f02eeb30b9681c
~runner/work/Patch-Recovery/Patch-Recovery/magiskboot cpio ramdisk.cpio 'add 0755 system/bin/recovery system/bin/recovery'
~runner/work/Patch-Recovery/Patch-Recovery/magiskboot repack ../recovery.img new-boot.img
~runner/work/Patch-Recovery/Patch-Recovery/magiskboot repack ../r.img new-boot.img
cp new-boot.img ../recovery-patched.img

0 comments on commit 442d641

Please sign in to comment.