From f28bba0275853e03f5f97f7052653e0df9563778 Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 12 Jul 2024 13:43:03 +0200 Subject: [PATCH] Let magisk handle the recovery.img shenanigans --- script1.sh | 5 +++-- script2.sh | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/script1.sh b/script1.sh index 1f9ac0c..c5ad825 100644 --- a/script1.sh +++ b/script1.sh @@ -4,8 +4,9 @@ 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=recovery.img of=r.img bs=4k count=$off iflag=count_bytes +#off=$(grep -ab -o SEANDROIDENFORCE recovery.img |tail -n 1 |cut -d : -f 1) +#dd if=recovery.img of=r.img bs=4k count=$off iflag=count_bytes +cp recovery.img r.img if [ ! -f phh.pem ];then openssl genrsa -f4 -out phh.pem 4096 diff --git a/script2.sh b/script2.sh index 9f579db..572815e 100644 --- a/script2.sh +++ b/script2.sh @@ -18,6 +18,10 @@ cd unpack ~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 27f02eeb30b1681c 27f02eeb30b9681c ~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery b4f082ee28b1701c b4f082ee28b970c1 ~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 9ef0f4ec28b1701c 9ef0f4ec28b9701c -~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 ../r.img new-boot.img +~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 9ef00ced28b1701c 9ef00ced28b9701c +~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 2001597ae0000054 2001597ae1000054 # ccmp w9, w25, #0, eq ; b.e #0x20 ===> b.ne #0x20 +~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 24f0f2ea30b1681c 24f0f2ea30b9681c +~runner/work/Patch-Recovery/Patch-Recovery/magiskboot hexpatch system/bin/recovery 41010054a0020012f44f48a9 4101005420008052f44f48a9 +~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 ../r.img new-boot.img cp new-boot.img ../recovery-patched.img