"adb tcpip" should require a numeric argument.
Defaulting to port 0 just breaks stuff.
Bug: http://b/22636927
Change-Id: I6239900e0828e71b31171d0184c24824957c99c8
diff --git a/adb/commandline.cpp b/adb/commandline.cpp
index 4e0db2b..7d6de98 100644
--- a/adb/commandline.cpp
+++ b/adb/commandline.cpp
@@ -1200,10 +1200,12 @@
return 0;
}
}
+ else if (!strcmp(argv[0], "tcpip") && argc > 1) {
+ return adb_connect_command(android::base::StringPrintf("tcpip:%s", argv[1]));
+ }
else if (!strcmp(argv[0], "remount") ||
!strcmp(argv[0], "reboot") ||
!strcmp(argv[0], "reboot-bootloader") ||
- !strcmp(argv[0], "tcpip") ||
!strcmp(argv[0], "usb") ||
!strcmp(argv[0], "root") ||
!strcmp(argv[0], "unroot") ||