summaryrefslogtreecommitdiffstats
path: root/init/builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/builtins.c')
-rw-r--r--init/builtins.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/init/builtins.c b/init/builtins.c
index d9f7bbe..37bbaa3 100644
--- a/init/builtins.c
+++ b/init/builtins.c
@@ -517,10 +517,14 @@ int do_mount_all(int nargs, char **args)
return -1;
}
- /* ret is 1 if the device is encrypted, 0 if not, and -1 on error */
- if (ret == 1) {
+ /* ret is 2 if device needs encrypted, 1 if the device appears encrypted,
+ * 0 if not, and -1 on error */
+ if (ret == 2) {
+ property_set("ro.crypto.state", "unencrypted");
+ property_set("vold.decrypt", "trigger_encryption");
+ } else 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