adbd: allow port configuration on host.
Test: manual Change-Id: I68cbd9bdb253a68463cc65e63a764ad4fa410c1c
This commit is contained in:
parent
983f76b3c6
commit
06e7cb5af0
1 changed files with 6 additions and 0 deletions
|
@ -248,6 +248,12 @@ int adbd_main(int server_port) {
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue