stf icon indicating copy to clipboard operation
stf copied to clipboard

Running adb on port other than 5037 for stf

Open djcm75 opened this issue 8 years ago • 4 comments

Hi, is it possible to run adb on two different ports ex port 5037 and 5038 If yes, how do I configure stf to listen on port 5038. I require this because I have another console based application that uses minicap and runs on port 5037

djcm75 avatar Jun 04 '18 04:06 djcm75

It won't work. If you run two instances of ADB, one of them will take ownership of all devices, leaving the other one empty.

I'm not convinced you actually need two separate ports, though. I don't see why you couldn't use 5037 for both.

sorccu avatar Jun 04 '18 05:06 sorccu

Thank for your response, the reason I want to run two instances on separate ports is because the other application also use minicap and this is causing the device to hang some time

djcm75 avatar Jun 12 '18 10:06 djcm75

Regardless of whether you want to do that, it just won't work - only one of the instances will get access to the USB device. So if you launch two processes, it'll only be visible in one.

sorccu avatar Jun 12 '18 12:06 sorccu

If you still want to try you can try having these open at the same time:

adb server nodaemon -P 5037
adb server nodaemon -P 5038

Then e.g. adb -P 5038 shell echo 1.

sorccu avatar Jun 12 '18 12:06 sorccu