summaryrefslogtreecommitdiffstats
path: root/minadbd
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--minadbd/Android.mk1
-rw-r--r--minadbd/adb_main.cpp2
-rw-r--r--minadbd/services.cpp14
3 files changed, 15 insertions, 2 deletions
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