Persisting ADB TCP/IP on TC70x Devices

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.

Javier Molina
If this is for development

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

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Dalton Brady
This should solve my problem,

This should solve my problem, Thanks for the reply I'll update you with more info on how I use it may end up helping others.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dalton Brady
@Javier Molina Your answer

@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?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Javier Molina
If all you need from ADB is

If all you need from ADB is the ability to remotely install an APK, you can include a similar self-updating functionality in your app by integrating EMDK and the "App Manager" profile.

App Manager - Zebra Technologies Techdocs

Your app can download the new apk to the device and invoke EMDK's App Manager to install it. Typically, installing an APK requires the user to approve the installation but EMDK bypasses that prompt and will install the apk without user intervention. We have implemented this kind of self-update with good results in the past.

Will that help?

Javier Molina

Technical Architect, Kutir Mobility

Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Dalton Brady
I was looking into this after

I was looking into this after my last reply, and I'm going to have to go this route. Thanks for all your help!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments