commit | 3347223a0535f514da42c949a5ae2ca70e337576 | [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 | 1a2d100a126bd9baf194d04c655f6d493d79afe4 [diff] | |
parent | 2b83eed28d0b3c153e2da0a46496a41a36b617f6 [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);