AK3: add magiskboot KEEPVBMETAFLAG support
- some devices fail to boot when magiskboot changes the vbmeta flag is set in the AVBv2 signature from 00 to 03, this allows disabling that behavior - set keep_vbmeta_flag=1 in anykernel.sh to force it to keep whatever's there, =auto will take it from the existing image if Magisk-patched (Canary 23016 or later), and =0 will allow the default magiskboot behavior
This commit is contained in:
2 files changed
+8
-2
No files matched your search
+7
-1
@@ -349,13 +349,19 @@ flash_boot() {
|
||||
*-dtb) rm -f kernel_dtb;;
|
||||
esac;
|
||||
fi;
|
||||
unset magisk_patched KEEPFORCEENCRYPT KEEPVERITY SHA1 TWOSTAGEINIT;
|
||||
unset magisk_patched KEEPFORCEENCRYPT KEEPVERITY SHA1 TWOSTAGEINIT; # leave KEEPVBMETAFLAG set for repack
|
||||
;;
|
||||
esac;
|
||||
case $ramdisk_compression in
|
||||
none|cpio) nocompflag="-n";;
|
||||
esac;
|
||||
case $keep_vbmeta_flag in
|
||||
auto) [ "$KEEPVBMETAFLAG" ] || export KEEPVBMETAFLAG=false;;
|
||||
1) export KEEPVBMETAFLAG=true;;
|
||||
*) export KEEPVBMETAFLAG=false;;
|
||||
esac;
|
||||
$bin/magiskboot repack $nocompflag $bootimg $home/boot-new.img;
|
||||
unset KEEPVBMETAFLAG;
|
||||
fi;
|
||||
if [ $? != 0 ]; then
|
||||
abort "Repacking image failed. Aborting...";
|
||||
|
||||
Reference in new issue
Block a user