summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk19
-rw-r--r--adbbu/Android.mk9
-rw-r--r--minadbd/Android.mk1
-rw-r--r--minadbd/adb_main.cpp2
-rw-r--r--minadbd/services.cpp14
-rw-r--r--minui/minui.h2
-rw-r--r--minui/resources.cpp6
-rw-r--r--mtp/Android.mk9
-rw-r--r--prebuilt/Android.mk5
-rw-r--r--twrp.cpp2
-rw-r--r--twrpTarMain/Android.mk13
11 files changed, 57 insertions, 25 deletions
diff --git a/Android.mk b/Android.mk
index c28426aa6..1e894f1f5 100644
--- a/Android.mk
+++ b/Android.mk
@@ -119,7 +119,10 @@ LOCAL_SHARED_LIBRARIES += libaosprecovery libz libc libcutils libstdc++ libtar l
LOCAL_SHARED_LIBRARIES += libcrecovery
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
- LOCAL_SHARED_LIBRARIES += libstlport libmincrypttwrp
+ LOCAL_SHARED_LIBRARIES += libstlport
+endif
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
+ LOCAL_SHARED_LIBRARIES += libmincrypttwrp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/libmincrypt/includes
LOCAL_CFLAGS += -DUSE_OLD_VERIFIER
else
@@ -563,12 +566,18 @@ LOCAL_CFLAGS := -std=gnu++0x
LOCAL_SRC_FILES := adb_install.cpp asn1_decoder.cpp bootloader.cpp legacy_property_service.cpp set_metadata.cpp tw_atomic.cpp
LOCAL_SHARED_LIBRARIES += libc liblog libcutils libmtdutils libfusesideload libselinux
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
- LOCAL_SHARED_LIBRARIES += libstdc++ libstlport libmincrypttwrp
- LOCAL_C_INCLUDES := bionic external/stlport/stlport $(LOCAL_PATH)/libmincrypt/includes
+ LOCAL_SHARED_LIBRARIES += libstdc++ libstlport
+ LOCAL_C_INCLUDES := bionic external/stlport/stlport
+else
+ LOCAL_SHARED_LIBRARIES += libc++
+endif
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
+ LOCAL_SHARED_LIBRARIES += libmincrypttwrp
+ LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes
LOCAL_SRC_FILES += oldverifier/verifier.cpp
LOCAL_CFLAGS += -DUSE_OLD_VERIFIER
else
- LOCAL_SHARED_LIBRARIES += libc++ libcrypto
+ LOCAL_SHARED_LIBRARIES += libcrypto
LOCAL_SRC_FILES += verifier.cpp
endif
@@ -638,7 +647,7 @@ include $(commands_recovery_local_path)/injecttwrp/Android.mk \
$(commands_recovery_local_path)/adbbu/Android.mk \
$(commands_recovery_local_path)/libpixelflinger/Android.mk
-ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
include $(commands_recovery_local_path)/libmincrypt/Android.mk
endif
diff --git a/adbbu/Android.mk b/adbbu/Android.mk
index 2c2d50a7b..10faf6f65 100644
--- a/adbbu/Android.mk
+++ b/adbbu/Android.mk
@@ -29,6 +29,9 @@ 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 = \
@@ -36,10 +39,4 @@ LOCAL_SRC_FILES = \
LOCAL_SHARED_LIBRARIES += libz libc libstdc++
-ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
- LOCAL_SHARED_LIBRARIES += libstlport
-else
- LOCAL_SHARED_LIBRARIES += libc++
-endif
-
include $(BUILD_SHARED_LIBRARY)
diff --git a/minadbd/Android.mk b/minadbd/Android.mk
index 2bfe1198c..ef5994539 100644
--- a/minadbd/Android.mk
+++ b/minadbd/Android.mk
@@ -7,6 +7,7 @@ minadbd_cflags := \
-Wno-unused-parameter \
-Wno-missing-field-initializers \
-DADB_HOST=0 \
+ -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
include $(CLEAR_VARS)
diff --git a/minadbd/adb_main.cpp b/minadbd/adb_main.cpp
index 0694280cb..1db0d5f58 100644
--- a/minadbd/adb_main.cpp
+++ b/minadbd/adb_main.cpp
@@ -36,7 +36,7 @@ int adb_server_main(int is_daemon, int server_port, int /* reply_fd */) {
init_transport_registration();
usb_init();
- VLOG(ADB) << "Event loop starting";
+ //VLOG(ADB) << "Event loop starting";
fdevent_loop();
return 0;
diff --git a/minadbd/services.cpp b/minadbd/services.cpp
index 658a43f36..753a14e38 100644
--- a/minadbd/services.cpp
+++ b/minadbd/services.cpp
@@ -73,7 +73,12 @@ static int create_service_thread(void (*func)(int, void *), void *cookie) {
sti->cookie = cookie;
sti->fd = s[1];
+#if PLATFORM_SDK_VERSION == 23
+ adb_thread_t t;
+ if (adb_thread_create( &t, (adb_thread_func_t)service_bootstrap_func, sti)){
+#else
if (!adb_thread_create(service_bootstrap_func, sti)) {
+#endif
free(sti);
adb_close(s[0]);
adb_close(s[1]);
@@ -81,7 +86,7 @@ static int create_service_thread(void (*func)(int, void *), void *cookie) {
return -1;
}
- VLOG(SERVICES) << "service thread started, " << s[0] << ":" << s[1];
+ //VLOG(SERVICES) << "service thread started, " << s[0] << ":" << s[1];
return s[0];
}
@@ -102,3 +107,10 @@ int service_to_fd(const char* name, const atransport* transport) {
}
return ret;
}
+
+#if PLATFORM_SDK_VERSION == 23
+int service_to_fd(const char* name) {
+ atransport transport;
+ return service_to_fd(name, &transport);
+}
+#endif
diff --git a/minui/minui.h b/minui/minui.h
index 5e49100cd..dee46411e 100644
--- a/minui/minui.h
+++ b/minui/minui.h
@@ -108,6 +108,8 @@ int res_create_display_surface(const char* name, GRSurface** pSurface);
// by row.
int res_create_multi_display_surface(const char* name, int* frames,
int* fps, GRSurface*** pSurface);
+int res_create_multi_display_surface(const char* name, int* frames,
+ GRSurface*** pSurface);
// Load a single alpha surface from a grayscale PNG image.
int res_create_alpha_surface(const char* name, GRSurface** pSurface);
diff --git a/minui/resources.cpp b/minui/resources.cpp
index 40d3c2c88..34c9c82ba 100644
--- a/minui/resources.cpp
+++ b/minui/resources.cpp
@@ -323,6 +323,12 @@ exit:
return result;
}
+int res_create_multi_display_surface(const char* name, int* frames,
+ GRSurface*** pSurface) {
+ int fps = 0;
+ return res_create_multi_display_surface(name, frames, &fps, pSurface);
+}
+
int res_create_alpha_surface(const char* name, GRSurface** pSurface) {
GRSurface* surface = NULL;
int result = 0;
diff --git a/mtp/Android.mk b/mtp/Android.mk
index 7128bdefe..c6a7fb7db 100644
--- a/mtp/Android.mk
+++ b/mtp/Android.mk
@@ -9,6 +9,9 @@ LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -fno-strict-aliasi
LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic frameworks/base/include system/core/include bionic/libc/private/
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 = \
@@ -34,12 +37,6 @@ LOCAL_SRC_FILES = \
node.cpp
LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutils libaosprecovery libselinux
-ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
- LOCAL_SHARED_LIBRARIES += libstlport
-else
- LOCAL_SHARED_LIBRARIES += libc++
-endif
-
ifneq ($(TW_MTP_DEVICE),)
LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE)
endif
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index 538be7177..f7f8c917d 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -91,7 +91,7 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgccdemangle.so
endif
-ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 23; echo $$?),0)
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 23; echo $$?),0)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpackagelistparser.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblzma.so
@@ -233,6 +233,9 @@ ifeq ($(TWRP_INCLUDE_LOGCAT), true)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsysutils.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnl.so
endif
+ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpcrecpp.so
+ endif
endif
TWRP_AUTOGEN := $(intermediates)/teamwin
GEN := $(intermediates)/teamwin
diff --git a/twrp.cpp b/twrp.cpp
index 3de35af98..859a7fcfc 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -59,6 +59,8 @@ extern "C" {
struct selabel_handle *selinux_handle;
#endif
+extern int adb_server_main(int is_daemon, int server_port, int /* reply_fd */);
+
TWPartitionManager PartitionManager;
int Log_Offset;
bool datamedia;
diff --git a/twrpTarMain/Android.mk b/twrpTarMain/Android.mk
index c88351bd8..71b9bcd00 100644
--- a/twrpTarMain/Android.mk
+++ b/twrpTarMain/Android.mk
@@ -14,12 +14,10 @@ LOCAL_SRC_FILES:= \
LOCAL_CFLAGS:= -g -c -W -DBUILD_TWRPTAR_MAIN
LOCAL_C_INCLUDES += bionic
-ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
- LOCAL_C_INCLUDES += external/stlport/stlport bionic/libstdc++/include
-endif
LOCAL_STATIC_LIBRARIES := libc libtar_static
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
+ LOCAL_C_INCLUDES += external/stlport/stlport bionic/libstdc++/include
LOCAL_STATIC_LIBRARIES += libstlport_static
endif
LOCAL_STATIC_LIBRARIES += libstdc++
@@ -59,8 +57,13 @@ LOCAL_SRC_FILES:= \
../gui/twmsg.cpp
LOCAL_CFLAGS:= -g -c -W -DBUILD_TWRPTAR_MAIN
-LOCAL_C_INCLUDES += bionic external/stlport/stlport
-LOCAL_SHARED_LIBRARIES := libc libtar libstlport libstdc++
+LOCAL_C_INCLUDES += bionic
+LOCAL_SHARED_LIBRARIES := libc libtar
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
+ LOCAL_C_INCLUDES += external/stlport/stlport bionic/libstdc++/include
+ LOCAL_SHARED_LIBRARIES += libstlport_static
+endif
+LOCAL_SHARED_LIBRARIES += libstdc++
ifeq ($(TWHAVE_SELINUX), true)
LOCAL_C_INCLUDES += external/libselinux/include