summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorPaul Lawrence <paullawrence@google.com>2015-04-28 19:14:45 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-28 19:14:45 +0000
commit6e8c8f542d673f3402df6b70df64b29c759e526a (patch)
tree684c19a54a0f82c7edd0005dd3cf2de86e4d409e /init
parent4b81659ed2c0dd71c123301238c35b1e825e5b7a (diff)
parent34276a15347cb2dc603ca8e34e57f5c9a0b4ad0d (diff)
downloadcore-6e8c8f542d673f3402df6b70df64b29c759e526a.tar.gz
core-6e8c8f542d673f3402df6b70df64b29c759e526a.tar.bz2
core-6e8c8f542d673f3402df6b70df64b29c759e526a.zip
Merge "Revert "Only run vold command when file encryption enabled""
Diffstat (limited to 'init')
-rw-r--r--init/builtins.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp
index d7723838e..c03968990 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -440,7 +440,6 @@ int do_mount_all(int nargs, char **args)
property_set("vold.decrypt", "trigger_encryption");
} else if (ret == FS_MGR_MNTALL_DEV_MIGHT_BE_ENCRYPTED) {
property_set("ro.crypto.state", "encrypted");
- property_set("ro.crypto.type", "block");
property_set("vold.decrypt", "trigger_default_encryption");
} else if (ret == FS_MGR_MNTALL_DEV_NOT_ENCRYPTED) {
property_set("ro.crypto.state", "unencrypted");
@@ -458,7 +457,6 @@ int do_mount_all(int nargs, char **args)
return -1;
}
property_set("ro.crypto.state", "encrypted");
- property_set("ro.crypto.type", "file");
// Although encrypted, we have device key, so we do not need to
// do anything different from the nonencrypted case.
@@ -468,7 +466,6 @@ int do_mount_all(int nargs, char **args)
return -1;
}
property_set("ro.crypto.state", "encrypted");
- property_set("ro.crypto.type", "file");
property_set("vold.decrypt", "trigger_restart_min_framework");
} else if (ret > 0) {
ERROR("fs_mgr_mount_all returned unexpected error %d\n", ret);
@@ -829,16 +826,10 @@ static int do_installkeys_ensure_dir_exists(const char* dir)
int do_installkey(int nargs, char **args)
{
- if (nargs != 2) {
- return -1;
- }
-
- char prop_value[PROP_VALUE_MAX] = {0};
- property_get("ro.crypto.type", prop_value);
- if (strcmp(prop_value, "file")) {
- return 0;
+ if (nargs == 2) {
+ return e4crypt_create_device_key(args[1],
+ do_installkeys_ensure_dir_exists);
}
- return e4crypt_create_device_key(args[1],
- do_installkeys_ensure_dir_exists);
+ return -1;
}