Below Items discuss ways to setup ADB for remote adb access to use for instrumented testing
Setup a mac/win/linux machine (adb controller) to connect to 7 devices over adb (or 14 with two root usb hubs)
- adb version on abd-controller must match version on build server image
- run adb in listen all mode on adb controller
adb -a -P 5037 fork-server server&
- setup alias on build server
alias adb='adb -H <hostname>'
where hostname is ip/hostname of adb-controller - gradlew connected
I had a similar situation. I work on a remote desktop for development but my android device is connected to my local laptop. I wanted to be able to use adb and the android plugin in eclipse on the remote desktop and connect to the device attached to my laptop. After searching on the internet and not finding anything that really helped, I decided to write a port forwarder that would do the trick. You can find it here. I hope it will be helpful to other people as well.
Beginning Android 4.3 you can:
- Make
adb
server listen on all interfaces. You have two options:
- Make gListen=1 and recompile
adb
(I have compiled it on Linux-x64 machine for you and put it here) - Start adb server with
-a
parameter:adb -a -P 5037 fork-server server&
- Use
adb
on your remote machine with extra parameter, e.g.adb -H <remote_host> shell