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

Commit 9819bdb3 authored by The Android Open Source Project's avatar The Android Open Source Project Committed by Android Git Automerger
Browse files

am 775a8df6: merge from open-source master

Merge commit '775a8df6' into kraken

* commit '775a8df6':
  adb: Add persistent system property for running adb in TCPIP mode
parents 9110b6c8 775a8df6
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -914,10 +914,13 @@ int adb_main(int is_daemon)
    }
    }


        /* for the device, start the usb transport if the
        /* for the device, start the usb transport if the
        ** android usb device exists and "service.adb.tcp"
        ** android usb device exists and the "service.adb.tcp.port" and
        ** is not set, otherwise start the network transport.
        ** "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) {
    if (sscanf(value, "%d", &port) == 1 && port > 0) {
        // listen on TCP port specified by service.adb.tcp.port property
        // listen on TCP port specified by service.adb.tcp.port property
        local_init(port);
        local_init(port);