diff options
Diffstat (limited to '')
-rw-r--r-- | partitionmanager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp index c1b857ca9..8aceec268 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -65,6 +65,9 @@ extern "C" { #ifdef TW_INCLUDE_FBE #include "crypto/ext4crypt/Decrypt.h" #endif + #ifdef TW_CRYPTO_USE_SYSTEM_VOLD + #include "crypto/vold_decrypt/vold_decrypt.h" + #endif #endif #ifdef AB_OTA_UPDATER @@ -1569,6 +1572,12 @@ int TWPartitionManager::Decrypt_Device(string Password) { pwret = WEXITSTATUS(status) ? -1 : 0; } +#ifdef TW_CRYPTO_USE_SYSTEM_VOLD + if (pwret != 0) { + pwret = vold_decrypt(Password); + } +#endif // TW_CRYPTO_USE_SYSTEM_VOLD + // Unmount any partitions that were needed for decrypt for (iter = Partitions.begin(); iter != Partitions.end(); iter++) { if ((*iter)->Mount_To_Decrypt) { |