Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44668cda authored by Josh Gao's avatar Josh Gao Committed by android-build-merger
Browse files

Merge "adbd: allow port configuration on host."

am: 2fd9d735

Change-Id: I519b2c84ed20eb04aa994db24dee6481a925749a
parents 987e61a1 2fd9d735
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);