summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authornkk71 <nkk71x@gmail.com>2017-01-05 22:55:05 +0100
committernkk71 <nkk71x@gmail.com>2017-03-06 17:50:52 +0100
commit71c6c50d0da1f32dd18a749797e88de2358c5ba1 (patch)
tree788c81abdeb80f028754935f825538284cce550e /partitionmanager.cpp
parentFix missing libf2fs.so needed by mkfs.f2fs (diff)
downloadandroid_bootable_recovery-71c6c50d0da1f32dd18a749797e88de2358c5ba1.tar
android_bootable_recovery-71c6c50d0da1f32dd18a749797e88de2358c5ba1.tar.gz
android_bootable_recovery-71c6c50d0da1f32dd18a749797e88de2358c5ba1.tar.bz2
android_bootable_recovery-71c6c50d0da1f32dd18a749797e88de2358c5ba1.tar.lz
android_bootable_recovery-71c6c50d0da1f32dd18a749797e88de2358c5ba1.tar.xz
android_bootable_recovery-71c6c50d0da1f32dd18a749797e88de2358c5ba1.tar.zst
android_bootable_recovery-71c6c50d0da1f32dd18a749797e88de2358c5ba1.zip
Diffstat (limited to '')
-rw-r--r--partitionmanager.cpp9
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) {