manager.sh: check vbmeta device by getprop

This commit is contained in:
vvb2060 2023-08-08 01:29:05 +08:00 committed by John Wu
parent 8290358241
commit 40003691d6

View File

@ -202,8 +202,7 @@ get_flags() {
ISENCRYPTED=false ISENCRYPTED=false
[ "$(getprop ro.crypto.state)" = "encrypted" ] && ISENCRYPTED=true [ "$(getprop ro.crypto.state)" = "encrypted" ] && ISENCRYPTED=true
KEEPFORCEENCRYPT=$ISENCRYPTED KEEPFORCEENCRYPT=$ISENCRYPTED
# Although this most certainly won't work without root, keep it just in case if [ -n "$(getprop ro.boot.vbmeta.device)" ]; then
if [ -e /dev/block/by-name/vbmeta_a ] || [ -e /dev/block/by-name/vbmeta ]; then
VBMETAEXIST=true VBMETAEXIST=true
else else
VBMETAEXIST=false VBMETAEXIST=false