From 442d641264312f8c126390b34494b28810c26e7d Mon Sep 17 00:00:00 2001 From: jwagnervaz <67094529+jwagnervaz@users.noreply.github.com> Date: Sun, 16 Oct 2022 20:28:36 -0300 Subject: [PATCH] Update script2.sh --- script2.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/script2.sh b/script2.sh index 10940f8..1055abe 100644 --- a/script2.sh +++ b/script2.sh @@ -1,12 +1,12 @@ #!/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 @@ -14,7 +14,7 @@ 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 @@ -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