Deutsch   English   Français   Italiano  
<vvkjhq$1lt7$1@nnrp.usenet.blueworldhosting.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: Marion <marion@facts.com>
Newsgroups: comp.mobile.android
Subject: Re: Do you use ADB (or ScreenCopy) with Android & Windows?
Date: Fri, 9 May 2025 09:57:14 -0000 (UTC)
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID: <vvkjhq$1lt7$1@nnrp.usenet.blueworldhosting.com>
References: <vv90ud$1m6m$1@nnrp.usenet.blueworldhosting.com> <m85neuFg731U1@mid.individual.net> <vvk9ok$2jou$1@nnrp.usenet.blueworldhosting.com> <m85q0hFgc9bU1@mid.individual.net> <vvki75$2kl0$1@nnrp.usenet.blueworldhosting.com>
Injection-Date: Fri, 9 May 2025 09:57:14 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
	logging-data="55207"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: MacSOUP/2.8.5 (ea919cf118) (Mac OS 10.12.6)
Cancel-Lock: sha1:/QAqxENAvVeUS2sSpvpKYJPNFhQ= sha256:cAveFIaxR+OU0zZxYzddihWVC9hB6SGl9vm3Tg6QR8M=
	sha1:zpk1cn8P00G+Zcg65ZxZOlrSm0A= sha256:lUjuxg3LvFgq1nPCJfVWVLR71yAq85H6/m71r/ed9qI=
Bytes: 3051
Lines: 53

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.