Encryption: try wrapped key also for device without metadata support
Change-Id: I8b58e45ec0d42470226083e8003dcd8152a91af1
diff --git a/partition.cpp b/partition.cpp
index 5d4e61d..aa82c09 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -662,7 +662,14 @@
LOGERR("Primary block device '%s' for mount point '%s' is not present!\n", Primary_Block_Device.c_str(), Mount_Point.c_str());
}
} else {
- Decrypt_FBE_DE();
+
+ if (!Decrypt_FBE_DE()) {
+ LOGINFO("Trying wrapped key.\n");
+ property_set("fbe.data.wrappedkey", "true");
+ if (!Decrypt_FBE_DE()) {
+ LOGERR("Unable to decrypt FBE device\n");
+ }
+ }
}
if (datamedia && (!Is_Encrypted || (Is_Encrypted && Is_Decrypted))) {
Setup_Data_Media();