AnsweredAssumed Answered

Android Kitkat imx6: How to use ABD over TCP by default

Question asked by Bill Butler on May 15, 2015
Latest reply on May 18, 2015 by Elven Wang

On Mx6 Running kitkat android


Our design is not going to have the usb (otg) port available. I would like to set the adbd to use the tcp connections by default. I can get it to work but I have to restart adbd about reboot.


I have tried


root@nitrogen6x: # setprop persist.adb.tcp.port 5555


and added








I can get adb to connect

         <sdk>\platform-tools> adb connect


ONLY if i restart adbd


root@nitrogen6x: # stop adbd

root@nitrogen6x: # start adbd


I don't under why this is required.. in system/core/adb/adb.c


I see



    // If one of these properties is set, also listen on that port

    // If one of the properties isn't set and we couldn't listen on usb,

    // listen on the default port.

    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) {

        printf("using port=%d\n", port);

        // listen on TCP port specified by service.adb.tcp.port property


    } else if (!usb) {

        // listen on default port




I don't understand what is preventing it from starting correctly without adbd restart.


Any thoughts before I start ripping up the code :-)