summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-01-14 16:36:13 +0100
committerDees_Troy <dees_troy@teamw.in>2013-01-14 16:36:13 +0100
commit999b39d04148d2ff8806e4613cbbe3aaa32d367a (patch)
treeb5a541c7682a228aff8c1123f259d354ea033fba /partitionmanager.cpp
parentremove relink files for samsung encryption libraries. (diff)
downloadandroid_bootable_recovery-999b39d04148d2ff8806e4613cbbe3aaa32d367a.tar
android_bootable_recovery-999b39d04148d2ff8806e4613cbbe3aaa32d367a.tar.gz
android_bootable_recovery-999b39d04148d2ff8806e4613cbbe3aaa32d367a.tar.bz2
android_bootable_recovery-999b39d04148d2ff8806e4613cbbe3aaa32d367a.tar.lz
android_bootable_recovery-999b39d04148d2ff8806e4613cbbe3aaa32d367a.tar.xz
android_bootable_recovery-999b39d04148d2ff8806e4613cbbe3aaa32d367a.tar.zst
android_bootable_recovery-999b39d04148d2ff8806e4613cbbe3aaa32d367a.zip
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index e752a129c..7ebd64f0b 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1650,6 +1650,13 @@ int TWPartitionManager::Decrypt_Device(string Password) {
sdcard->Is_Decrypted = true;
sdcard->EcryptFS_Password = Password;
sdcard->Decrypted_Block_Device = sdcard->Actual_Block_Device;
+ string MetaEcfsFile = EXPAND(TW_EXTERNAL_STORAGE_PATH);
+ MetaEcfsFile += "/.MetaEcfsFile";
+ if (!TWFunc::Path_Exists(MetaEcfsFile)) {
+ // External storage isn't actually encrypted so unmount and remount without ecryptfs
+ sdcard->UnMount(false);
+ sdcard->Mount(false);
+ }
} else {
sdcard->Is_Decrypted = false;
sdcard->Decrypted_Block_Device = "";