AK3: partial revert of d6e040c2 until issue with kernel_dtb is addressed

- magiskboot split needs to be updated to not decompress so that if there's a patched kernel_dtb it can be properly appended to the restored unpatched compressed new kernel

see: https://github.com/topjohnwu/Magisk/pull/6597#issuecomment-1518709863
This commit is contained in:
osm0sis committed 2023-04-23 00:05:05 -03:00
1 parent f080b80e30
commit f2dbe60f63
1 file changed
+2 -7
+2 -7
View File
@@ -237,7 +237,7 @@ repack_ramdisk() {
# flash_boot (build, sign and write image only)
flash_boot() {
local varlist i kernel ramdisk fdt cmdline comp part0 part1 needskernelpatch nocompflag signfail pk8 cert avbtype;
local varlist i kernel ramdisk fdt cmdline comp part0 part1 nocompflag signfail pk8 cert avbtype;
cd $split_img;
if [ -f "$bin/mkimage" ]; then
@@ -327,11 +327,10 @@ flash_boot() {
$comp -dc $kernel > kernel;
fi;
# legacy SAR kernel string skip_initramfs -> want_initramfs
$bin/magiskboot hexpatch kernel 736B69705F696E697472616D6673 77616E745F696E697472616D6673 && needskernelpatch=1;
$bin/magiskboot hexpatch kernel 736B69705F696E697472616D6673 77616E745F696E697472616D6673;
if [ "$(file_getprop $home/anykernel.sh do.systemless)" == 1 ]; then
strings kernel 2>/dev/null | grep -E -m1 'Linux version.*#' > $home/vertmp;
fi;
if [ "$needskernelpatch" ]; then
if [ "$comp" ]; then
$bin/magiskboot compress=$comp kernel kernel.$comp;
if [ $? != 0 ] && $comp --help 2>/dev/null; then
@@ -340,10 +339,6 @@ flash_boot() {
fi;
mv -f kernel.$comp kernel;
fi;
else
echo "Restoring untouched new kernel since no patching required..." >&2;
cp -f $kernel kernel;
fi;
[ ! -f .magisk ] && $bin/magiskboot cpio ramdisk.cpio "extract .backup/.magisk .magisk";
export $(cat .magisk);
for fdt in dtb extra kernel_dtb recovery_dtbo; do