adb: Improved support for running adb over TCP/IP
Added new commands:
adb connect <host>:<port> (to connect to a device via TCP/IP)
adb tcpip <port> (to restart adbd on the device to listen on TCP/IP)
adb usb (to restart adbd on the device to listen USB)
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/adb/transport.c b/adb/transport.c
index c9e7752..617dabf 100644
--- a/adb/transport.c
+++ b/adb/transport.c
@@ -849,11 +849,11 @@
}
#endif // ADB_HOST
-void register_socket_transport(int s, const char *serial, int port)
+void register_socket_transport(int s, const char *serial, int port, int local)
{
atransport *t = calloc(1, sizeof(atransport));
D("transport: %p init'ing for socket %d, on port %d\n", t, s, port);
- if ( init_socket_transport(t, s, port) < 0 ) {
+ if ( init_socket_transport(t, s, port, local) < 0 ) {
adb_close(s);
free(t);
return;