wrappedkey: don't use twrp for processing anymore

Now in android-11 we can now process legacy and newer wrappedkey
support in our libfscrypt library. TWRP doesn't need to set a
property to check for wrapped key. libfscrypt will just process
wrappedkey fs_mgr flag for legacy wrapped key or wrappedkey_v0
for the newer wrapped key supported in android-11.

Change-Id: Ia94c7ebe34a05c9b25bbb7a5b2e899902c93d203
This commit is contained in:
bigbiff
2021-09-28 00:53:32 +00:00
parent db475c9015
commit 437d86f6a0
2 changed files with 3 additions and 34 deletions
+1 -12
View File
@@ -419,18 +419,7 @@ void TWPartitionManager::Decrypt_Data() {
usleep(500);
if (Decrypt_Data->Mount(false)) {
if (!Decrypt_Data->Decrypt_FBE_DE()) {
char wrappedvalue[PROPERTY_VALUE_MAX];
property_get("fbe.data.wrappedkey", wrappedvalue, "");
std::string wrappedkeyvalue(wrappedvalue);
if (wrappedkeyvalue == "true") {
LOGERR("Unable to decrypt FBE device\n");
} else {
LOGINFO("Trying wrapped key.\n");
property_set("fbe.data.wrappedkey", "true");
if (!Decrypt_Data->Decrypt_FBE_DE()) {
LOGERR("Unable to decrypt FBE device\n");
}
}
LOGERR("Unable to decrypt FBE device\n");
}
} else {