summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-04-15 16:35:47 +0200
committerDees_Troy <dees_troy@teamw.in>2013-07-01 22:20:58 +0200
commit74fb2e94d5ff09d4b5871ca33160862f72a641b6 (patch)
tree516adb61ce9145d878875b5830974b158d67b6d5
parentSupport encrypted backup files (diff)
downloadandroid_bootable_recovery-74fb2e94d5ff09d4b5871ca33160862f72a641b6.tar
android_bootable_recovery-74fb2e94d5ff09d4b5871ca33160862f72a641b6.tar.gz
android_bootable_recovery-74fb2e94d5ff09d4b5871ca33160862f72a641b6.tar.bz2
android_bootable_recovery-74fb2e94d5ff09d4b5871ca33160862f72a641b6.tar.lz
android_bootable_recovery-74fb2e94d5ff09d4b5871ca33160862f72a641b6.tar.xz
android_bootable_recovery-74fb2e94d5ff09d4b5871ca33160862f72a641b6.tar.zst
android_bootable_recovery-74fb2e94d5ff09d4b5871ca33160862f72a641b6.zip
Diffstat (limited to '')
-rw-r--r--gui/action.cpp7
-rw-r--r--partition.cpp5
-rw-r--r--partitionmanager.cpp11
3 files changed, 22 insertions, 1 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index 9bd5ce5fb..3e1f793df 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -818,6 +818,13 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
} else {
skip = true;
}
+ } else if (wipe_path == "INTERNAL") {
+ if (!PartitionManager.Wipe_Media_From_Data()) {
+ ret_val = false;
+ break;
+ } else {
+ skip = true;
+ }
}
if (!skip) {
if (!PartitionManager.Wipe_By_Path(wipe_path)) {
diff --git a/partition.cpp b/partition.cpp
index 7b687e721..f92d62f21 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -480,7 +480,7 @@ bool TWPartition::Process_Flags(string Flags, bool Display_Error) {
Storage_Name = Display_Name;
if (!has_display_name && has_storage_name)
Display_Name = Storage_Name;
- if (has_display_name && !has_backup_name)
+ if (has_display_name && !has_backup_name && Backup_Display_Name != "Android Secure")
Backup_Display_Name = Display_Name;
if (!has_display_name && has_backup_name)
Display_Name = Backup_Display_Name;
@@ -1158,6 +1158,9 @@ bool TWPartition::Wipe_Encryption() {
return false;
Has_Data_Media = false;
+ Decrypted_Block_Device = "";
+ Is_Decrypted = false;
+ Is_Encrypted = false;
if (Wipe(Fstab_File_System)) {
Has_Data_Media = Save_Data_Media;
if (Has_Data_Media && !Symlink_Mount_Point.empty()) {
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index a78705ba3..d7f1600ef 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1191,6 +1191,9 @@ int TWPartitionManager::Wipe_Media_From_Data(void) {
return -1;
if (dat->Has_Data_Media) {
dat->Recreate_Media_Folder();
+ // Unmount and remount - slightly hackish way to ensure that the "/sdcard" folder is still mounted properly after wiping
+ dat->UnMount(false);
+ dat->Mount(false);
}
return true;
} else {
@@ -1417,6 +1420,7 @@ int TWPartitionManager::Decrypt_Device(string Password) {
dat->Is_Decrypted = true;
dat->Decrypted_Block_Device = crypto_blkdev;
dat->Setup_File_System(false);
+ dat->Current_File_System = dat->Fstab_File_System; // Needed if we're ignoring blkid because encrypted devices start out as emmc
gui_print("Data successfully decrypted, new block device: '%s'\n", crypto_blkdev);
#ifdef CRYPTO_SD_FS_TYPE
@@ -1848,6 +1852,13 @@ void TWPartitionManager::Get_Partition_List(string ListType, std::vector<Partiti
part.selected = 0;
Partition_List->push_back(part);
}
+ if ((*iter)->Has_Data_Media) {
+ struct PartitionList datamedia;
+ datamedia.Display_Name = (*iter)->Storage_Name;
+ datamedia.Mount_Point = "INTERNAL";
+ datamedia.selected = 0;
+ Partition_List->push_back(datamedia);
+ }
}
} else {
LOGERR("Unknown list type '%s' requested for TWPartitionManager::Get_Partition_List\n", ListType.c_str());