diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2017-10-01 05:22:13 +0200 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2017-11-28 23:03:41 +0100 |
commit | fefe5915b06a1121d885fba3680dd1b90027fd5d (patch) | |
tree | 2370923b618bdbe2592873cd311944628a1d0a62 /partition.cpp | |
parent | Merge "Support v2 fstab format" into android-8.0 (diff) | |
download | android_bootable_recovery-fefe5915b06a1121d885fba3680dd1b90027fd5d.tar android_bootable_recovery-fefe5915b06a1121d885fba3680dd1b90027fd5d.tar.gz android_bootable_recovery-fefe5915b06a1121d885fba3680dd1b90027fd5d.tar.bz2 android_bootable_recovery-fefe5915b06a1121d885fba3680dd1b90027fd5d.tar.lz android_bootable_recovery-fefe5915b06a1121d885fba3680dd1b90027fd5d.tar.xz android_bootable_recovery-fefe5915b06a1121d885fba3680dd1b90027fd5d.tar.zst android_bootable_recovery-fefe5915b06a1121d885fba3680dd1b90027fd5d.zip |
Diffstat (limited to '')
-rw-r--r-- | partition.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/partition.cpp b/partition.cpp index 8b73f646b..3957c6542 100644 --- a/partition.cpp +++ b/partition.cpp @@ -656,7 +656,9 @@ void TWPartition::Setup_Data_Partition(bool Display_Error) { //ExcludeAll(Mount_Point + "/user_de"); //ExcludeAll(Mount_Point + "/misc/profiles/cur/0"); // might be important later ExcludeAll(Mount_Point + "/misc/gatekeeper"); + ExcludeAll(Mount_Point + "/misc/keystore"); ExcludeAll(Mount_Point + "/drm/kek.dat"); + ExcludeAll(Mount_Point + "/system_de/0/spblob"); // contains data needed to decrypt pixel 2 int retry_count = 3; while (!Decrypt_DE() && --retry_count) usleep(2000); @@ -668,7 +670,12 @@ void TWPartition::Setup_Data_Partition(bool Display_Error) { DataManager::SetValue(TW_IS_FBE, 1); DataManager::SetValue(TW_IS_ENCRYPTED, 1); string filename; - DataManager::SetValue(TW_CRYPTO_PWTYPE, Get_Password_Type(0, filename)); + int pwd_type = Get_Password_Type(0, filename); + if (pwd_type < 0) { + LOGERR("This TWRP does not have synthetic password decrypt support\n"); + pwd_type = 0; // default password + } + DataManager::SetValue(TW_CRYPTO_PWTYPE, pwd_type); DataManager::SetValue(TW_CRYPTO_PASSWORD, ""); DataManager::SetValue("tw_crypto_display", ""); } |