5 Replies Latest reply on Nov 25, 2018 2:27 PM by Dalton Brady

    Persisting ADB TCP/IP on TC70x Devices

    Dalton Brady

      I'm currently trying to persist adb tcp/ip <port> on TC70x devices however I'm hitting a bit of a roadblock.

       

      What I've tried:

      - adb remount /system (nothing happens)

      - adb push build.prop /system (permission denied / read-only fs)

       

      The same things pretty much apply to default.prop as / is read-only as well.

       

      - adb shell setprop service.adb.tcp.port <port>

      This actually saves the property, but does not persist after reboot??

      - adb shell setprop persist.service.adb.tcp.port <port>

      This saves a blank string or something never returns <port> entered.

       

      I would rather not have to break into this OS in order to get this done but I will if I have to. Really I just want to know what steps I should use to persist this setting without to much work ( I could just write a script to do it to every device I have 30+).

       

      It should really be this easy:

      adb shell setprop persist.service.adb.tcp.port<port>

       

      I'm currently developing a WMS for 3PL providers that integrates with Zebra Products (Printers / Mobile Printers / Touch Computers / RFID)

       

      ### *** Update *** ###

      Upon closer inspection of the EMDK it appears that adb over usb can be turned on/off with relative ease. I haven't found a reference for something similar for adb tcp/ip I'll update when I've done further research.

      USB Manager - Zebra Technologies Techdocs - reference to the docs about Turning adb over usb on / off. I assume allowing adb is general is required but it won't persist the tcp/ip listening on a specified port

       

      Message was edited by: Dalton Brady added some more <code/> brackets to clear up code references.

       

      Message was edited by: Dalton Brady added an update relating to normal usb adb operations control using emdk.

        • Re: Persisting ADB TCP/IP on TC70x Devices
          Javier Molina

          If this is for development only, you could create a shell script with

           

          stop adbd

          setprop service.adb.tcp.port 5555

          start adbd

           

          and also create a small app that would listen for the android.intent.action.BOOT_COMPLETED intent from the system and launch the script at that time. That would save you from having to break into the OS (a security issues that allowed you to do that would tend to be patched in new releases of the firmware and invalidate your work) and, although not ideal (it still requires you to write and install some code), it should work well enough and the installation can be automated with a script or StageNow.

           

          Hope that helps

           

          Javier Molina

          Technical Architect, Kutir Mobility

          Posted on behalf of Zebra Technologies

          1 of 1 people found this helpful
          • Re: Persisting ADB TCP/IP on TC70x Devices
            Dalton Brady

            @Javier Molina Your answer would work for me if I had root access to my build. My intent was to enable / disable adb tcp/ip connection to allow for remote app update deployments. However without root I cannot stop / start adbd. I haven't been able to find a way to stop / start adbd on the device without root **yet**. Any ideas on this?