Add "mountdefaultencrypted" command to vdc.
It's being used by the emulator.
Test: vdc --wait cryptfs mountdefaultencrypted
Bug: 65795120
Change-Id: I8a5d622e4fa1ef93bb8e22f2665c882b1a152b3d
diff --git a/vdc.cpp b/vdc.cpp
index 3a38641..3335908 100644
--- a/vdc.cpp
+++ b/vdc.cpp
@@ -96,6 +96,8 @@
int encryptionFlags = android::os::IVold::ENCRYPTION_FLAG_IN_PLACE
| android::os::IVold::ENCRYPTION_FLAG_NO_UI;
exit(vold->fdeEnable(passwordType, "", encryptionFlags).isOk() ? 0 : ENOTTY);
+ } else if (arg1 == "cryptfs" && arg2 == "mountdefaultencrypted") {
+ exit(vold->mountDefaultEncrypted().isOk() ? 0 : ENOTTY);
} else if (arg1 == "volume" && arg2 == "shutdown") {
exit(vold->shutdown().isOk() ? 0 : ENOTTY);
} else {