ADB Backup: add ability for TWRP GUI to restore
Restore adb backup files that TWRP made to your PC.
Put files in your backup directory to see them.
e.g. /sdcard/TWRP/BACKUPS/<sn>
Change-Id: I2c57970d77b64c39a302159041456e761c185259
diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml
index c3d89fe..f460e6f 100644
--- a/gui/theme/common/landscape.xml
+++ b/gui/theme/common/landscape.xml
@@ -2047,7 +2047,7 @@
<fileselector>
<placement x="%col1_x_left%" y="%row1a_y%" w="%content_quarter_width%" h="%fileselector_install_height%"/>
<text>{@restore_sel_pack_fs=Select Package to Restore:}</text>
- <filter folders="1" files="0" nav="0"/>
+ <filter folders="1" files="1" nav="0" extn=".ab"/>
<path name="tw_backups_folder"/>
<data name="tw_restore" default=""/>
<selection name="tw_restore_name"/>
@@ -2273,6 +2273,7 @@
<checkbox>
<placement x="%col1_x_right%" y="%row6_y%"/>
+ <condition var1="tw_enable_adb_backup" op="=" var2="0"/>
<text>{@restore_enable_digest_chk=Enable Digest Verification of Backup Files}</text>
<data variable="tw_skip_digest_check"/>
</checkbox>
diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml
index f163bea..0d1d6d8 100644
--- a/gui/theme/common/portrait.xml
+++ b/gui/theme/common/portrait.xml
@@ -2209,7 +2209,7 @@
<fileselector>
<placement x="%indent%" y="%row3_y%" w="%content_width%" h="%fileselector_install_height%"/>
<text>{@restore_sel_pack_fs=Select Package to Restore:}</text>
- <filter folders="1" files="0" nav="0"/>
+ <filter folders="1" files="1" nav="0" extn=".ab"/>
<path name="tw_backups_folder"/>
<data name="tw_restore" default=""/>
<selection name="tw_restore_name"/>
@@ -2429,6 +2429,7 @@
</partitionlist>
<checkbox>
+ <condition var1="tw_enable_adb_backup" op="=" var2="0"/>
<placement x="%indent%" y="%row17_y%"/>
<text>{@restore_enable_digest_chk=Enable Digest Verification of Backup Files}</text>
<data variable="tw_skip_digest_check"/>
diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml
index d5ef869..152818e 100644
--- a/gui/theme/common/watch.xml
+++ b/gui/theme/common/watch.xml
@@ -2551,7 +2551,7 @@
<fileselector>
<placement x="%indent%" y="%row2_header_y%" w="%content_width%" h="%fileselector_install_height%"/>
<text>%tw_storage_display_name%</text>
- <filter folders="1" files="0" nav="0"/>
+ <filter folders="1" files="1" nav="0" extn=".ab"/>
<path name="tw_backups_folder"/>
<data name="tw_restore" default=""/>
<selection name="tw_restore_name"/>
@@ -2807,6 +2807,7 @@
</text>
<listbox style="scrolllist">
+ <condition var1="tw_enable_adb_backup" op="=" var2="0"/>
<placement x="%col1_x_left%" y="%row2_header_y%" w="%content_width%" h="%partitionlist_wipe_height%"/>
<listitem name="{@restore_enable_digest_chk=Enable Digest Verification of Backup Files}">
<data variable="tw_skip_digest_check"/>