From 19fb79c722622ac4a068e258501ab4b161420cda Mon Sep 17 00:00:00 2001 From: bigbiff bigbiff Date: Mon, 5 Sep 2016 21:04:51 -0400 Subject: 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/ Change-Id: I2c57970d77b64c39a302159041456e761c185259 --- twrp.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'twrp.cpp') diff --git a/twrp.cpp b/twrp.cpp index b68e321b9..8c2a24f22 100644 --- a/twrp.cpp +++ b/twrp.cpp @@ -45,6 +45,7 @@ extern "C" { #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 @@ int main(int argc, char **argv) { // 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 @@ int main(int argc, char **argv) { } } #endif + twrpAdbBuFifo *adb_bu_fifo = new twrpAdbBuFifo(); + adb_bu_fifo->threadAdbBuFifo(); + // Launch the main GUI gui_start(); @@ -379,6 +384,7 @@ int main(int argc, char **argv) { // Reboot TWFunc::Update_Intent_File(Send_Intent); + delete adb_bu_fifo; TWFunc::Update_Log_File(); gui_msg(Msg("rebooting=Rebooting...")); string Reboot_Arg; -- cgit v1.2.3