Skip to content

Commit 54d62a3

Browse files
committed
AK3: add option to skip vbmeta patching while avb is enabled
Signed-off-by: engstk <[email protected]>
1 parent 075e6ff commit 54d62a3

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

META-INF/com/google/android/updater-script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Dummy file; update-binary is a shell script (DO NOT CHANGE)
44
#
55
#
6-
# AK_BASE_VERSION=20241012
6+
# AK_BASE_VERSION=20241014

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ __supported.patchlevels=__ and __supported.vendorpatchlevels=__ will match again
6161

6262
`NO_MAGISK_CHECK=1` may be added to disable detection of Magisk and related kernel/dtb repatching for special zips which don't require that.
6363

64+
`NO_VBMETA_CHECK=1` may be added to disable vbmeta process when using lptools/httools, since GKI is bootable with verity/verification ON, as long avb is not enforced for boot stage kernel partitions
65+
6466
## // Command Methods ##
6567
```
6668
ui_print "<text>" [...]

tools/ak3-core.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ flash_generic() {
483483
if [ "$path" == "/dev/block/mapper" ]; then
484484
avb=$(httools_static avb $1);
485485
[ $? == 0 ] || abort "Failed to parse fstab entry for $1. Aborting...";
486-
if [ "$avb" ]; then
486+
if [ "$avb" ] && [ ! "$NO_VBMETA_CHECK" ]; then
487487
flags=$(httools_static disable-flags);
488488
[ $? == 0 ] || abort "Failed to parse top-level vbmeta. Aborting...";
489489
if [ "$flags" == "enabled" ]; then
@@ -820,7 +820,8 @@ setup_ak() {
820820
[ "$slot_select" ] && SLOT_SELECT="$slot_select";
821821
[ "$no_block_display" ] && NO_BLOCK_DISPLAY="$no_block_display";
822822
[ "$no_magisk_check" ] && NO_MAGISK_CHECK="$no_magisk_check";
823-
unset block is_slot_device ramdisk_compression patch_vbmeta_flag customdd slot_select no_block_display no_magisk_check;
823+
[ "$no_vbmeta_check" ] && NO_VBMETA_CHECK="$no_vbmeta_check";
824+
unset block is_slot_device ramdisk_compression patch_vbmeta_flag customdd slot_select no_block_display no_magisk_check no_vbmeta_check;
824825

825826
# slot detection enabled by IS_SLOT_DEVICE=1 or auto (from anykernel.sh)
826827
case $IS_SLOT_DEVICE in

0 commit comments

Comments
 (0)