Add "mountdefaultencrypted" command to vdc.

It's being used by the emulator.

Test: vdc --wait cryptfs mountdefaultencrypted
Bug: 65795120
Change-Id: I8a5d622e4fa1ef93bb8e22f2665c882b1a152b3d
This commit is contained in:
Jeff Sharkey 2017-09-18 13:49:51 -06:00
parent 5820b51c22
commit 57b1874505

View file

@ -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 {