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/twrp.cpp b/twrp.cpp
index b68e321..8c2a24f 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -45,6 +45,7 @@
#include "partitions.hpp"
#include "openrecoveryscript.hpp"
#include "variables.h"
+#include "twrpAdbBuFifo.hpp"
#ifdef TW_USE_NEW_MINADBD
#include "minadbd/minadbd.h"
#else
@@ -330,6 +331,7 @@
// Check if system has never been changed
TWPartition* sys = PartitionManager.Find_Partition_By_Path("/system");
TWPartition* ven = PartitionManager.Find_Partition_By_Path("/vendor");
+
if (sys) {
if ((DataManager::GetIntValue("tw_mount_system_ro") == 0 && sys->Check_Lifetime_Writes() == 0) || DataManager::GetIntValue("tw_mount_system_ro") == 2) {
if (DataManager::GetIntValue("tw_never_show_system_ro_page") == 0) {
@@ -351,6 +353,9 @@
}
}
#endif
+ twrpAdbBuFifo *adb_bu_fifo = new twrpAdbBuFifo();
+ adb_bu_fifo->threadAdbBuFifo();
+
// Launch the main GUI
gui_start();
@@ -379,6 +384,7 @@
// Reboot
TWFunc::Update_Intent_File(Send_Intent);
+ delete adb_bu_fifo;
TWFunc::Update_Log_File();
gui_msg(Msg("rebooting=Rebooting..."));
string Reboot_Arg;