Commit 70d3b243 authored by topjohnwu's avatar topjohnwu

Keep dm/avb-verity when device is using system_root_image

Close #512
parent 8664e9d1
...@@ -98,7 +98,6 @@ mount_partitions() { ...@@ -98,7 +98,6 @@ mount_partitions() {
mount --move /system /system_root mount --move /system /system_root
mount -o bind /system_root/system /system mount -o bind /system_root/system /system
fi fi
$SYSTEM_ROOT && ui_print "- Device using system_root_image"
if [ -L /system/vendor ]; then if [ -L /system/vendor ]; then
# Seperate /vendor partition # Seperate /vendor partition
is_mounted /vendor || mount -o ro /vendor 2>/dev/null is_mounted /vendor || mount -o ro /vendor 2>/dev/null
...@@ -114,17 +113,13 @@ get_flags() { ...@@ -114,17 +113,13 @@ get_flags() {
# override variables # override variables
getvar KEEPVERITY getvar KEEPVERITY
getvar KEEPFORCEENCRYPT getvar KEEPFORCEENCRYPT
HIGHCOMP=false
if [ -z $KEEPVERITY ]; then if [ -z $KEEPVERITY ]; then
KEEPVERITY=false if $SYSTEM_ROOT; then
hardware=`grep_cmdline androidboot.hardware` KEEPVERITY=true
for hw in taimen walleye; do ui_print "- Using system_root_image, keep dm/avb-verity"
if [ "$hw" = "$hardware" ]; then else
KEEPVERITY=true KEEPVERITY=false
ui_print "- Device on whitelist, keep avb-verity" fi
break
fi
done
fi fi
if [ -z $KEEPFORCEENCRYPT ]; then if [ -z $KEEPFORCEENCRYPT ]; then
if [ "`getprop ro.crypto.state`" = "encrypted" ]; then if [ "`getprop ro.crypto.state`" = "encrypted" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment