Sujet : Re: Do you use ADB (or ScreenCopy) with Android & Windows?
De : marion (at) *nospam* facts.com (Marion)
Groupes : comp.mobile.androidDate : 09. May 2025, 10:57:14
Autres entêtes
Organisation : BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID : <vvkjhq$1lt7$1@nnrp.usenet.blueworldhosting.com>
References : 1 2 3 4 5
User-Agent : MacSOUP/2.8.5 (ea919cf118) (Mac OS 10.12.6)
On Fri, 9 May 2025 09:34:30 -0000 (UTC), Marion wrote :
I forgot how I did it though... looking it upo... as we speak...
OK. I found it. Since 55555 is just too convenient, and since 5555 is what
adb used to use (long ago), it was almost certain I figured out a way to
tell adb which port to use - so I had to backtrack how I managed that.
Which means I had long ago figured out the answer to this question:
Was...
Q2: Where is that port set inside of the adb tool?
Hell if I know.
Which is now...
Q2: Where is that port set inside of the adb tool?
C:\> set | findstr /i adb
ANDROID_ADB_SERVER_PORT=55555
To test, here's what I did...
C:\> set ANDROID_ADB_SERVER_PORT=
C:\> adb kill-server
cannot connect to daemon at tcp:5037:
cannot connect to 127.0.0.1:5037:
No connection could be made because the target machine actively refused it. (10061)
Drat. I should have killed adb before unsetting the port.
I opened a new window and killed adb first.
Bingo!
C:\> adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
SMSGA325GV1 device
OK. So this happens to be the answer to the 3 questions...I think.
Q1: What port does *your* Windows adb use?
A1: TCP:5037
Q2: Where is that port set inside of the adb tool?
A2: setenv ANDROID_ADB_SERVER_PORT 55555
Win+R > sysdm.cpl > Advanced > Environment Variables
System Variables > ANDROID_ADB_SERVER_PORT
Q3: On Windows, what did you do to *reserve* that port?
If it's below 1024, you don't have to do anything.
If it's above 1023, you should reserve the port using:
C:\> netsh int ipv4 add excludedportrange protocol=tcp startport=55555 numberofports=1
I think this solves the problem.
Thanks.