From 3237e40efbcbb5b1db6538b7845618a943acf0a2 Mon Sep 17 00:00:00 2001 From: Chris Renshaw Date: Tue, 8 Aug 2023 13:27:14 -0300 Subject: [PATCH 1/3] manager.sh: check vbmeta in ro.product.ab_ota_partitions as well - 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, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/raw/manager.sh b/app/src/main/res/raw/manager.sh index 57f694d049cb..67bb80cb9a7c 100644 --- a/app/src/main/res/raw/manager.sh +++ b/app/src/main/res/raw/manager.sh @@ -202,11 +202,8 @@ get_flags() { ISENCRYPTED=false [ "$(getprop ro.crypto.state)" = "encrypted" ] && ISENCRYPTED=true KEEPFORCEENCRYPT=$ISENCRYPTED - if [ -n "$(getprop ro.boot.vbmeta.device)" ]; then - VBMETAEXIST=true - else - VBMETAEXIST=false - fi + VBMETAEXIST=false + [ -n "$(getprop ro.boot.vbmeta.device)" ] || getprop ro.product.ab_ota_partitions | grep -wq vbmeta && VBMETAEXIST=true # Preset PATCHVBMETAFLAG to false in the non-root case PATCHVBMETAFLAG=false # Make sure RECOVERYMODE has value From b39551cf04ff99e537d00ab914311a848dd7d204 Mon Sep 17 00:00:00 2001 From: Chris Renshaw Date: Wed, 9 Aug 2023 14:06:31 -0300 Subject: [PATCH 2/3] SQUASHME --- app/src/main/res/raw/manager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/raw/manager.sh b/app/src/main/res/raw/manager.sh index 67bb80cb9a7c..739f27e2018f 100644 --- a/app/src/main/res/raw/manager.sh +++ b/app/src/main/res/raw/manager.sh @@ -203,7 +203,7 @@ get_flags() { [ "$(getprop ro.crypto.state)" = "encrypted" ] && ISENCRYPTED=true KEEPFORCEENCRYPT=$ISENCRYPTED VBMETAEXIST=false - [ -n "$(getprop ro.boot.vbmeta.device)" ] || getprop ro.product.ab_ota_partitions | grep -wq vbmeta && VBMETAEXIST=true + [ -n "$(getprop ro.boot.vbmeta.device)" -o -n "$(getprop ro.boot.vbmeta.size)" ] || getprop ro.product.ab_ota_partitions | grep -wq vbmeta && VBMETAEXIST=true # Preset PATCHVBMETAFLAG to false in the non-root case PATCHVBMETAFLAG=false # Make sure RECOVERYMODE has value From ef9b4e2d08ea33019243af8c08f4569f6803220a Mon Sep 17 00:00:00 2001 From: John Wu Date: Mon, 28 Aug 2023 00:44:38 -0700 Subject: [PATCH 3/3] Update manager.sh --- app/src/main/res/raw/manager.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/raw/manager.sh b/app/src/main/res/raw/manager.sh index 739f27e2018f..de1ad8be1f42 100644 --- a/app/src/main/res/raw/manager.sh +++ b/app/src/main/res/raw/manager.sh @@ -203,7 +203,11 @@ get_flags() { [ "$(getprop ro.crypto.state)" = "encrypted" ] && ISENCRYPTED=true KEEPFORCEENCRYPT=$ISENCRYPTED VBMETAEXIST=false - [ -n "$(getprop ro.boot.vbmeta.device)" -o -n "$(getprop ro.boot.vbmeta.size)" ] || getprop ro.product.ab_ota_partitions | grep -wq vbmeta && VBMETAEXIST=true + 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 + fi # Preset PATCHVBMETAFLAG to false in the non-root case PATCHVBMETAFLAG=false # Make sure RECOVERYMODE has value