summaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
Diffstat (limited to 'adb')
-rw-r--r--adb/Android.mk40
-rw-r--r--adb/adb.h10
2 files changed, 49 insertions, 1 deletions
diff --git a/adb/Android.mk b/adb/Android.mk
index 7faca9b..a61dcde 100644
--- a/adb/Android.mk
+++ b/adb/Android.mk
@@ -152,3 +152,43 @@ else
endif
endif
+
+
+# adb host tool for device-as-host
+# =========================================================
+include $(CLEAR_VARS)
+
+LOCAL_LDLIBS := -lrt -lncurses -lpthread
+
+LOCAL_SRC_FILES := \
+ adb.c \
+ console.c \
+ transport.c \
+ transport_local.c \
+ transport_usb.c \
+ commandline.c \
+ adb_client.c \
+ sockets.c \
+ services.c \
+ file_sync_client.c \
+ get_my_path_linux.c \
+ usb_linux.c \
+ utils.c \
+ usb_vendors.c \
+ fdevent.c
+
+LOCAL_CFLAGS := \
+ -O2 \
+ -g \
+ -DADB_HOST=1 \
+ -DADB_HOST_ON_TARGET=1 \
+ -Wall \
+ -Wno-unused-parameter \
+ -D_XOPEN_SOURCE \
+ -D_GNU_SOURCE
+
+LOCAL_MODULE := adb
+
+LOCAL_STATIC_LIBRARIES := libzipfile libunz libcutils
+
+include $(BUILD_EXECUTABLE)
diff --git a/adb/adb.h b/adb/adb.h
index 3d2a77b..0aa98d3 100644
--- a/adb/adb.h
+++ b/adb/adb.h
@@ -366,7 +366,15 @@ typedef enum {
#define print_packet(tag,p) do {} while (0)
#endif
-#define DEFAULT_ADB_PORT 5037
+#if ADB_HOST_ON_TARGET
+/* adb and adbd are coexisting on the target, so use 5038 for adb
+ * to avoid conflicting with adbd's usage of 5037
+ */
+# define DEFAULT_ADB_PORT 5038
+#else
+# define DEFAULT_ADB_PORT 5037
+#endif
+
#define DEFAULT_ADB_LOCAL_TRANSPORT_PORT 5555
#define ADB_CLASS 0xff