Better handling of data encryption

This commit is contained in:
topjohnwu
2020-09-28 04:45:56 -07:00
parent 9bebe07d5a
commit 46de1ed968
6 changed files with 10 additions and 10 deletions

View File

@ -363,10 +363,10 @@ get_flags() {
KEEPVERITY=false
fi
fi
ISENCRYPTED=false
grep ' /data ' /proc/mounts | grep -q 'dm-' && ISENCRYPTED=true
[ "$(getprop ro.crypto.state)" = "encrypted" ] && ISENCRYPTED=true
if [ -z $KEEPFORCEENCRYPT ]; then
ISENCRYPTED=false
grep ' /data ' /proc/mounts | grep -q 'dm-' && ISENCRYPTED=true
[ -d /data/unencrypted ] && ISENCRYPTED=true
# No data access means unable to decrypt in recovery
if $ISENCRYPTED || ! $DATA; then
KEEPFORCEENCRYPT=true