Changing default port (i.e. 5037) on which adb server runs

Viewed 62089

I am a budding android developer and if there is no easy way of configuring the adb server to run on another port then the inflexibility of the tools will force me to quit android app development.

A web search did not return any solutions.

I also searched for '5037' in all files in android sdk directory but did not find a setting there.

4 Answers

There is another variable that supports this for connecting to a different machine's adb:

ADB_SERVER_SOCKET=tcp:some.other.host:1234 adb devices

To use it, you need to start adb on the other host with -a and probably background it too:

( adb -a -P 1234 nodaemon server & ) &
Related