From 075e6ff32b0e39d385ee273232bf879c3d9787b5 Mon Sep 17 00:00:00 2001 From: osm0sis Date: Sat, 12 Oct 2024 20:37:18 -0300 Subject: [PATCH] AK3: fix Magisk check with magiskboot 27007+ --- META-INF/com/google/android/updater-script | 2 +- tools/ak3-core.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/META-INF/com/google/android/updater-script b/META-INF/com/google/android/updater-script index e537918..3b907e6 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=20241011 +# AK_BASE_VERSION=20241012 diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index 246d2b0..86e997c 100755 --- a/tools/ak3-core.sh +++ b/tools/ak3-core.sh @@ -221,7 +221,7 @@ repack_ramdisk() { magiskboot cpio ramdisk-new.cpio test; magisk_patched=$?; fi; - [ $((magisk_patched & 3)) -eq 1 ] && magiskboot cpio ramdisk-new.cpio "extract .backup/.magisk $SPLITIMG/.magisk"; + [ "$magisk_patched" -eq 1 ] && magiskboot cpio ramdisk-new.cpio "extract .backup/.magisk $SPLITIMG/.magisk"; if [ "$comp" ]; then magiskboot compress=$comp ramdisk-new.cpio; if [ $? != 0 ] && $comp --help 2>/dev/null; then @@ -326,7 +326,7 @@ flash_boot() { magiskboot cpio ramdisk.cpio test; magisk_patched=$?; fi; - if [ $((magisk_patched & 3)) -eq 1 ]; then + if [ "$magisk_patched" -eq 1 ]; then ui_print " " "Magisk detected! Patching kernel so reflashing Magisk is not necessary..."; comp=$(magiskboot decompress kernel 2>&1 | grep -vE 'raw|zimage' | sed -n 's;.*\[\(.*\)\];\1;p'); (magiskboot split $kernel || magiskboot decompress $kernel kernel) 2>/dev/null;