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
diff --git a/init/builtins.cpp b/init/builtins.cpp
index 413d11e..7cbb7a0 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -514,8 +514,9 @@
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 @@
}
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;