Add a mount with metadata encryption service
Don't use the FDE flow to support metadata encryption; just provide a
vold service which directly mounts the volume and use that.
Bug: 63927601
Test: Boot Taimen to SUW with and without metadata encryption.
Change-Id: Ifc6a012c02c0ea66893020ed1d0da4cba6914aed
diff --git a/vdc.cpp b/vdc.cpp
index 5ae4cd9..3c449ae 100644
--- a/vdc.cpp
+++ b/vdc.cpp
@@ -44,7 +44,7 @@
android::sp<android::IBinder> res;
auto sm = android::defaultServiceManager();
auto name = android::String16("vold");
- for (int i = 0; i < 500; i++) {
+ for (int i = 0; i < 5000; i++) {
res = sm->checkService(name);
if (res) {
LOG(VERBOSE) << "Waited " << (i * 10) << "ms for vold";
@@ -101,6 +101,10 @@
checkStatus(vold->shutdown());
} else if (args[0] == "cryptfs" && args[1] == "checkEncryption" && args.size() == 3) {
checkStatus(vold->checkEncryption(args[2]));
+ } else if (args[0] == "cryptfs" && args[1] == "mountFstab" && args.size() == 3) {
+ checkStatus(vold->mountFstab(args[2]));
+ } else if (args[0] == "cryptfs" && args[1] == "encryptFstab" && args.size() == 3) {
+ checkStatus(vold->encryptFstab(args[2]));
} else {
LOG(ERROR) << "Raw commands are no longer supported";
exit(EINVAL);