From 57b1874505cadea1aef7480ba05ed81686b9c259 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 18 Sep 2017 13:49:51 -0600 Subject: [PATCH] Add "mountdefaultencrypted" command to vdc. It's being used by the emulator. Test: vdc --wait cryptfs mountdefaultencrypted Bug: 65795120 Change-Id: I8a5d622e4fa1ef93bb8e22f2665c882b1a152b3d --- vdc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vdc.cpp b/vdc.cpp index 3a38641..3335908 100644 --- a/vdc.cpp +++ b/vdc.cpp @@ -96,6 +96,8 @@ int main(int argc, char **argv) { 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 {