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/adbbu/Android.mk b/adbbu/Android.mk
index 33d3ad7..efb5f9a 100644
--- a/adbbu/Android.mk
+++ b/adbbu/Android.mk
@@ -1,10 +1,35 @@
LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libtwadbbu
+LOCAL_MODULE_TAGS := optional
+LOCAL_CFLAGS = -fno-strict-aliasing -D_LARGFILE_SOURCE
+LOCAL_C_INCLUDES += bionic external/zlib
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
+ LOCAL_C_INCLUDES += external/stlport/stlport
+endif
+
+LOCAL_SRC_FILES = \
+ libtwadbbu.cpp \
+ twrpback.cpp
+
+LOCAL_SHARED_LIBRARIES += libz libc libstdc++ libtwrpdigest
+
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
+ LOCAL_SHARED_LIBRARIES += libstlport
+else
+ LOCAL_SHARED_LIBRARIES += libc++
+endif
+
+include $(BUILD_SHARED_LIBRARY)
+
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
- twrpback.cpp
+ adbbumain.cpp
-LOCAL_SHARED_LIBRARIES += libstdc++ libz libtwrpdigest
+LOCAL_SHARED_LIBRARIES += libstdc++ libz libtwadbbu
+
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_C_INCLUDES += external/stlport/stlport
LOCAL_SHARED_LIBRARIES += libstlport
@@ -21,21 +46,3 @@
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
include $(BUILD_EXECUTABLE)
-include $(CLEAR_VARS)
-LOCAL_MODULE := libtwadbbu
-LOCAL_MODULE_TAGS := optional
-LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing
-LOCAL_C_INCLUDES += bionic external/zlib
-ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
- LOCAL_C_INCLUDES += external/stlport/stlport
- LOCAL_SHARED_LIBRARIES += libstlport
-else
- LOCAL_SHARED_LIBRARIES += libc++
-endif
-
-LOCAL_SRC_FILES = \
- libtwadbbu.cpp
-
-LOCAL_SHARED_LIBRARIES += libz libc libstdc++
-
-include $(BUILD_SHARED_LIBRARY)