am 4e84d3bc: Set a read-only property to indicate if the device is running encrypted.
* commit '4e84d3bcf9af3452128fe2e8dc7607dff9016fac':
Set a read-only property to indicate if the device is running encrypted.
diff --git a/init/builtins.c b/init/builtins.c
index 8b2e4aa..915c5aa 100644
--- a/init/builtins.c
+++ b/init/builtins.c
@@ -388,6 +388,7 @@
/* Set the property that triggers the framework to do a minimal
* startup and ask the user for a password
*/
+ property_set("ro.crypto.state", "encrypted");
property_set("vold.decrypt", "1");
} else {
return -1;
@@ -395,6 +396,7 @@
} else {
if (!strcmp(target, DATA_MNT_POINT)) {
/* We succeeded in mounting /data, so it's not encrypted */
+ property_set("ro.crypto.state", "unencrypted");
action_for_each_trigger("nonencrypted", action_add_queue_tail);
}
}