From 474268a0af5f96905b97c88a7f7157fd76d3a1a5 Mon Sep 17 00:00:00 2001 From: Chris Renshaw Date: Mon, 28 Aug 2023 04:45:14 -0300 Subject: [PATCH] manager.sh: add ro.boot.vbmeta.size + ro.product.ab_ota_partitions to vbmeta check ro.boot.vbmeta.device doesn't seem to be in use on all A/B devices --- app/src/main/res/raw/manager.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/raw/manager.sh b/app/src/main/res/raw/manager.sh index 2b3104abe..828a1b05c 100644 --- a/app/src/main/res/raw/manager.sh +++ b/app/src/main/res/raw/manager.sh @@ -202,10 +202,11 @@ get_flags() { ISENCRYPTED=false [ "$(getprop ro.crypto.state)" = "encrypted" ] && ISENCRYPTED=true KEEPFORCEENCRYPT=$ISENCRYPTED - if [ -n "$(getprop ro.boot.vbmeta.device)" ]; then + VBMETAEXIST=false + if [ -n "$(getprop ro.boot.vbmeta.device)" -o -n "$(getprop ro.boot.vbmeta.size)" ]; then + VBMETAEXIST=true + elif getprop ro.product.ab_ota_partitions | grep -wq vbmeta; then VBMETAEXIST=true - else - VBMETAEXIST=false fi # Preset PATCHVBMETAFLAG to false in the non-root case PATCHVBMETAFLAG=false