Make adb's daemon-port on the host machine configurable.
This is the first CL of a somewhat larger effort which, among other things,
will involve changing the emulator and ddms to talk to adb running on a
configurable port.
The port can be configured using environment variable ANDROID_ADB_SERVER_PORT.
Further CLs will also address the set of ports used for the local transport.
Change-Id: Ib2f431801f0adcd9f2dd290a28005644a36a780a
diff --git a/adb/adb.h b/adb/adb.h
index aaf8a28..a2b611e 100644
--- a/adb/adb.h
+++ b/adb/adb.h
@@ -237,8 +237,8 @@
void send_packet(apacket *p, atransport *t);
void get_my_path(char *s, size_t maxLen);
-int launch_server();
-int adb_main(int is_daemon);
+int launch_server(int server_port);
+int adb_main(int is_daemon, int server_port);
/* transports are ref-counted
@@ -358,8 +358,8 @@
#define print_packet(tag,p) do {} while (0)
#endif
-#define ADB_PORT 5037
-#define ADB_LOCAL_TRANSPORT_PORT 5555
+#define DEFAULT_ADB_PORT 5037
+#define DEFAULT_ADB_LOCAL_TRANSPORT_PORT 5555
#define ADB_CLASS 0xff
#define ADB_SUBCLASS 0x42