Mount default encrypted devices at boot
If userdata is default encrypted, we should mount it at boot
to avoid bringing the framework up and then down unnecessarily.
Needs matching vold changes from
https://googleplex-android-review.googlesource.com/#/c/412649/
Bug: 8769627
Change-Id: I4b8276befd832cd788e15c36edfbf8f0e18d7e6b
diff --git a/init/builtins.c b/init/builtins.c
index e2932d5..a168062 100644
--- a/init/builtins.c
+++ b/init/builtins.c
@@ -501,10 +501,10 @@
return -1;
}
- /* ret is 1 if the device is encrypted, 0 if not, and -1 on error */
+ /* ret is 1 if the device appears encrypted, 0 if not, and -1 on error */
if (ret == 1) {
property_set("ro.crypto.state", "encrypted");
- property_set("vold.decrypt", "1");
+ property_set("vold.decrypt", "trigger_default_encryption");
} else if (ret == 0) {
property_set("ro.crypto.state", "unencrypted");
/* If fs_mgr determined this is an unencrypted device, then trigger