AK3: fix unpack/repack with magiskboot zimage kernel support
- exclude "zimage" as a compression type since magiskboot unpack, split and repack handle it automatically and there is no fallback - ensure $comp is a working command for all busybox compression fallbacks
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -3,4 +3,4 @@
|
||||
# Dummy file; update-binary is a shell script (DO NOT CHANGE)
|
||||
#
|
||||
#
|
||||
# AK_BASE_VERSION=20220310
|
||||
# AK_BASE_VERSION=20220403
|
||||
+3
-3
@@ -320,9 +320,9 @@ flash_boot() {
|
||||
fi;
|
||||
if [ $((magisk_patched & 3)) -eq 1 ]; then
|
||||
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');
|
||||
comp=$($bin/magiskboot decompress kernel 2>&1 | grep -vE 'raw|zimage' | sed -n 's;.*\[\(.*\)\];\1;p');
|
||||
($bin/magiskboot split $kernel || $bin/magiskboot decompress $kernel kernel) 2>/dev/null;
|
||||
if [ $? != 0 -a "$comp" ]; then
|
||||
if [ $? != 0 -a "$comp" ] && $comp --help 2>/dev/null; then
|
||||
echo "Attempting kernel unpack with busybox $comp..." >&2;
|
||||
$comp -dc $kernel > kernel;
|
||||
fi;
|
||||
@@ -332,7 +332,7 @@ flash_boot() {
|
||||
fi;
|
||||
if [ "$comp" ]; then
|
||||
$bin/magiskboot compress=$comp kernel kernel.$comp;
|
||||
if [ $? != 0 ]; then
|
||||
if [ $? != 0 ] && $comp --help 2>/dev/null; then
|
||||
echo "Attempting kernel repack with busybox $comp..." >&2;
|
||||
$comp -9c kernel > kernel.$comp;
|
||||
fi;
|
||||
|
||||
Reference in new issue
Block a user