summaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2010-04-20 14:06:40 -0400
committerMike Lockwood <lockwood@android.com>2010-04-20 14:06:40 -0400
commit8e2ceaeacf9fa1eb5ac41e4d3498836a6e2c7c97 (patch)
tree72ce062ad1208d824a4911da2186ab6fb0fb0c74 /adb
parent457d81cec12fce6e38c0dcd94d33d06036c2618a (diff)
downloadsystem_core-8e2ceaeacf9fa1eb5ac41e4d3498836a6e2c7c97.zip
system_core-8e2ceaeacf9fa1eb5ac41e4d3498836a6e2c7c97.tar.gz
system_core-8e2ceaeacf9fa1eb5ac41e4d3498836a6e2c7c97.tar.bz2
adb: Add persistent system property for running adb in TCPIP mode
In addition to service.adb.tcp.port, you can now set persist.adb.tcp.port to specify the port number for adb to listen to instead of USB. This allows the adb TCP configuration to persist across reboots. Change-Id: I897ffcb019e8dd1785996d2f3c571cfc2f8ded38 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'adb')
-rw-r--r--adb/adb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/adb/adb.c b/adb/adb.c
index 7df3f7b..e762ac6 100644
--- a/adb/adb.c
+++ b/adb/adb.c
@@ -919,10 +919,13 @@ int adb_main(int is_daemon)
}
/* for the device, start the usb transport if the
- ** android usb device exists and "service.adb.tcp"
- ** is not set, otherwise start the network transport.
+ ** android usb device exists and the "service.adb.tcp.port" and
+ ** "persist.adb.tcp.port" properties are not set.
+ ** Otherwise start the network transport.
*/
- property_get("service.adb.tcp.port", value, "0");
+ property_get("service.adb.tcp.port", value, "");
+ if (!value[0])
+ property_get("persist.adb.tcp.port", value, "");
if (sscanf(value, "%d", &port) == 1 && port > 0) {
// listen on TCP port specified by service.adb.tcp.port property
local_init(port);