Skip to content

Commit 9bf7335

Browse files
committed
Encryption: try wrapped key also for device without metadata support
Change-Id: I8b58e45ec0d42470226083e8003dcd8152a91af1
1 parent 8c0bcc8 commit 9bf7335

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

partition.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,14 @@ void TWPartition::Setup_Data_Partition(bool Display_Error) {
662662
LOGERR("Primary block device '%s' for mount point '%s' is not present!\n", Primary_Block_Device.c_str(), Mount_Point.c_str());
663663
}
664664
} else {
665-
Decrypt_FBE_DE();
665+
666+
if (!Decrypt_FBE_DE()) {
667+
LOGINFO("Trying wrapped key.\n");
668+
property_set("fbe.data.wrappedkey", "true");
669+
if (!Decrypt_FBE_DE()) {
670+
LOGERR("Unable to decrypt FBE device\n");
671+
}
672+
}
666673
}
667674
if (datamedia && (!Is_Encrypted || (Is_Encrypted && Is_Decrypted))) {
668675
Setup_Data_Media();

0 commit comments

Comments
 (0)