commit | 2fd9d735ea74de4a24065a998d58e7e3ab6192f0 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Wed Oct 16 23:22:44 2019 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Wed Oct 16 23:22:44 2019 +0000 |
tree | d63db424084a976c2938b811a304863bcc9e2529 | |
parent | 405e67b651dae1d8966c63631d6761e907a94421 [diff] | |
parent | 06e7cb5af010ba489aa09bf69a4491f6bf59a7dc [diff] |
Merge "adbd: allow port configuration on host."
diff --git a/adb/daemon/main.cpp b/adb/daemon/main.cpp index e5a4917..9ebab74 100644 --- a/adb/daemon/main.cpp +++ b/adb/daemon/main.cpp
@@ -248,6 +248,12 @@ prop_port = android::base::GetProperty("persist.adb.tcp.port", ""); } +#if !defined(__ANDROID__) + if (prop_port.empty() && getenv("ADBD_PORT")) { + prop_port = getenv("ADBD_PORT"); + } +#endif + int port; if (sscanf(prop_port.c_str(), "%d", &port) == 1 && port > 0) { D("using port=%d", port);