diff options
author | osm0sis <osm0sis@outlook.com> | 2020-01-12 23:32:16 -0400 |
---|---|---|
committer | osm0sis <osm0sis@outlook.com> | 2020-01-12 23:32:26 -0400 |
commit | bf9e9fd48769d8212012a13ae74ab05db41fa728 (patch) | |
tree | 4c6b058b6a5c5347b31772865e61751c5905cb42 | |
parent | 4bae117013c14be05dc8fe892d201c9ce55fac20 (diff) |
AK3: only attempt fallback kernel decompression if format was identified
-rwxr-xr-x | tools/ak3-core.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index 8d7636a..627b053 100755 --- a/tools/ak3-core.sh +++ b/tools/ak3-core.sh @@ -309,7 +309,7 @@ flash_boot() { ui_print " " "Magisk detected! Patching kernel so reflashing Magisk is not necessary..."; comp=$($bin/magiskboot decompress kernel 2>&1 | grep -v 'raw' | sed -n 's;.*\[\(.*\)\];\1;p'); ($bin/magiskboot split $kernel || $bin/magiskboot decompress $kernel kernel) 2>/dev/null; - if [ $? != 0 ]; then + if [ $? != 0 -a "$comp" ]; then echo "Attempting kernel unpack with busybox $comp..." >&2; $comp -dc $kernel > kernel; fi; |