diff options
author | Paul Crowley <paulcrowley@google.com> | 2018-01-30 09:56:03 -0800 |
---|---|---|
committer | Paul Crowley <paulcrowley@google.com> | 2018-02-01 14:54:04 -0800 |
commit | c684696a96623054666952e1616d57335fc4192c (patch) | |
tree | 13fb44791899d8349886a80e5617fac8647feeee /init/builtins.cpp | |
parent | 0ce76f910b1794d422f8d45d77a3ee2b95ec3d3e (diff) | |
download | system_core-c684696a96623054666952e1616d57335fc4192c.tar.gz system_core-c684696a96623054666952e1616d57335fc4192c.tar.bz2 system_core-c684696a96623054666952e1616d57335fc4192c.zip |
Use vold's mount with metadata encryption service.
Don't use the FDE flow to support metadata encryption; just use the
vold service which directly mounts the volume.
Bug: 63927601
Test: Boot Taimen to SUW with and without metadata encryption.
Change-Id: Idf9c27a69872cd7a9e2fb76df09a91d8e5ef4896
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r-- | init/builtins.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp index 413d11eb0..7cbb7a083 100644 --- a/init/builtins.cpp +++ b/init/builtins.cpp @@ -514,8 +514,9 @@ static Result<Success> queue_fs_event(int code) { property_set("ro.crypto.state", "encrypted"); property_set("ro.crypto.type", "file"); - // defaultcrypto detects file/block encryption. init flow is same for each. - ActionManager::GetInstance().QueueEventTrigger("defaultcrypto"); + // Although encrypted, vold has already set the device up, so we do not need to + // do anything different from the nonencrypted case. + ActionManager::GetInstance().QueueEventTrigger("nonencrypted"); return Success(); } else if (code == FS_MGR_MNTALL_DEV_NEEDS_METADATA_ENCRYPTION) { if (e4crypt_install_keyring()) { @@ -523,8 +524,9 @@ static Result<Success> queue_fs_event(int code) { } property_set("ro.crypto.type", "file"); - // encrypt detects file/block encryption. init flow is same for each. - ActionManager::GetInstance().QueueEventTrigger("encrypt"); + // Although encrypted, vold has already set the device up, so we do not need to + // do anything different from the nonencrypted case. + ActionManager::GetInstance().QueueEventTrigger("nonencrypted"); return Success(); } else if (code > 0) { Error() << "fs_mgr_mount_all() returned unexpected error " << code; |