AK3: fix Magisk check with magiskboot 27007+
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -3,4 +3,4 @@
|
|||||||
# Dummy file; update-binary is a shell script (DO NOT CHANGE)
|
# Dummy file; update-binary is a shell script (DO NOT CHANGE)
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# AK_BASE_VERSION=20241011
|
# AK_BASE_VERSION=20241012
|
||||||
+2
-2
@@ -221,7 +221,7 @@ repack_ramdisk() {
|
|||||||
magiskboot cpio ramdisk-new.cpio test;
|
magiskboot cpio ramdisk-new.cpio test;
|
||||||
magisk_patched=$?;
|
magisk_patched=$?;
|
||||||
fi;
|
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
|
if [ "$comp" ]; then
|
||||||
magiskboot compress=$comp ramdisk-new.cpio;
|
magiskboot compress=$comp ramdisk-new.cpio;
|
||||||
if [ $? != 0 ] && $comp --help 2>/dev/null; then
|
if [ $? != 0 ] && $comp --help 2>/dev/null; then
|
||||||
@@ -326,7 +326,7 @@ flash_boot() {
|
|||||||
magiskboot cpio ramdisk.cpio test;
|
magiskboot cpio ramdisk.cpio test;
|
||||||
magisk_patched=$?;
|
magisk_patched=$?;
|
||||||
fi;
|
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...";
|
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');
|
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;
|
(magiskboot split $kernel || magiskboot decompress $kernel kernel) 2>/dev/null;
|
||||||
|
|||||||
Reference in new issue
Block a user