summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2019-03-30 00:12:33 +0100
committerEthan Yonker <dees_troy@teamw.in>2019-04-02 05:56:55 +0200
commitcdd97c7fabf939daeda52bd4286787e887339849 (patch)
tree33776c42e441f2851cdcb5468c4c96da57b08218
parentZip install: this will allow TWRP to check md5 and sha256 checksums (diff)
downloadandroid_bootable_recovery-cdd97c7fabf939daeda52bd4286787e887339849.tar
android_bootable_recovery-cdd97c7fabf939daeda52bd4286787e887339849.tar.gz
android_bootable_recovery-cdd97c7fabf939daeda52bd4286787e887339849.tar.bz2
android_bootable_recovery-cdd97c7fabf939daeda52bd4286787e887339849.tar.lz
android_bootable_recovery-cdd97c7fabf939daeda52bd4286787e887339849.tar.xz
android_bootable_recovery-cdd97c7fabf939daeda52bd4286787e887339849.tar.zst
android_bootable_recovery-cdd97c7fabf939daeda52bd4286787e887339849.zip
-rwxr-xr-xpartitionmanager.cpp16
-rwxr-xr-x[-rw-r--r--]twrpAdbBuFifo.cpp1
2 files changed, 12 insertions, 5 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 6b5ee1cca..26a48e5dc 100755
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -907,10 +907,18 @@ int TWPartitionManager::Run_Backup(bool adbbackup) {
part_settings.file_bytes_remaining = part_settings.file_bytes;
gui_msg("backup_started=[BACKUP STARTED]");
- gui_msg(Msg("backup_folder= * Backup Folder: {1}")(part_settings.Backup_Folder));
- if (!TWFunc::Recursive_Mkdir(part_settings.Backup_Folder)) {
- gui_err("fail_backup_folder=Failed to make backup folder.");
- return false;
+
+ int is_decrypted = 0;
+ int is_encrypted = 0;
+
+ DataManager::GetValue(TW_IS_DECRYPTED, is_decrypted);
+ DataManager::GetValue(TW_IS_ENCRYPTED, is_encrypted);
+ if (!adbbackup || (!is_encrypted || (is_encrypted && is_decrypted))) {
+ gui_msg(Msg("backup_folder= * Backup Folder: {1}")(part_settings.Backup_Folder));
+ if (!TWFunc::Recursive_Mkdir(part_settings.Backup_Folder)) {
+ gui_err("fail_backup_folder=Failed to make backup folder.");
+ return false;
+ }
}
DataManager::SetProgress(0.0);
diff --git a/twrpAdbBuFifo.cpp b/twrpAdbBuFifo.cpp
index 22bfa4054..4f9bd2cbd 100644..100755
--- a/twrpAdbBuFifo.cpp
+++ b/twrpAdbBuFifo.cpp
@@ -274,7 +274,6 @@ bool twrpAdbBuFifo::Restore_ADB_Backup(void) {
Backup_FileName = Restore_Name.substr(pos + 1, Restore_Name.size());
part_settings.Part = PartitionManager.Find_Partition_By_Path(path);
part_settings.Backup_Folder = path;
- PartitionManager.Set_Restore_Files(path);
part_settings.partition_count = partition_count;
part_settings.adbbackup = true;
part_settings.adb_compression = twimghdr.compressed;