From 23e48c95715813dfb66903fe3d765f3f5c2f18d7 Mon Sep 17 00:00:00 2001 From: osm0sis Date: Sun, 28 Jun 2026 07:11:59 -0300 Subject: [PATCH] AK3: fix 'ash: bad number' when NO_MAGISK_CHECK=1 --- tools/ak3-core.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index c09ca7f..997d10c 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" -eq 1 ] && magiskboot cpio ramdisk-new.cpio "extract .backup/.magisk $SPLITIMG/.magisk"; + [ "$magisk_patched" == 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" -eq 1 ]; then + if [ "$magisk_patched" == 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;