From 9d09ba3ecd5b9015d4633bf8e355eca2fec44906 Mon Sep 17 00:00:00 2001 From: Chris Renshaw Date: Tue, 15 Aug 2023 20:08:55 -0300 Subject: [PATCH] AK3: add no_magisk_check=1 to skip Magisk detection and repatching --- META-INF/com/google/android/updater-script | 2 +- tools/ak3-core.sh | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/META-INF/com/google/android/updater-script b/META-INF/com/google/android/updater-script index ffb6603..008a858 100644 --- a/META-INF/com/google/android/updater-script +++ b/META-INF/com/google/android/updater-script @@ -3,4 +3,4 @@ # Dummy file; update-binary is a shell script (DO NOT CHANGE) # # -# AK_BASE_VERSION=20230810 +# AK_BASE_VERSION=20230815 diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index 3b47744..9b4346e 100755 --- a/tools/ak3-core.sh +++ b/tools/ak3-core.sh @@ -212,8 +212,10 @@ repack_ramdisk() { [ $? != 0 ] && packfail=1; cd $home; - $bin/magiskboot cpio ramdisk-new.cpio test; - magisk_patched=$?; + if [ ! "$no_magisk_check" ]; then + $bin/magiskboot cpio ramdisk-new.cpio test; + magisk_patched=$?; + fi; [ $((magisk_patched & 3)) -eq 1 ] && $bin/magiskboot cpio ramdisk-new.cpio "extract .backup/.magisk $split_img/.magisk"; if [ "$comp" ]; then $bin/magiskboot compress=$comp ramdisk-new.cpio; @@ -315,7 +317,7 @@ flash_boot() { done; case $kernel in *Image*) - if [ ! "$magisk_patched" ]; then + if [ ! "$magisk_patched" -a ! "$no_magisk_check" ]; then $bin/magiskboot cpio ramdisk.cpio test; magisk_patched=$?; fi;