2

I want to connect my device through wifi to adb but, when I use adb connect 192.168.1.34:5555 show me following error:

cannot connect to 192.168.1.35:5555: An attempt was made to access a socket in a way forbidden by its access permissions. (10013)

It was working until a few days ago, but now it is completely out of order. I read all solution from this thread but not work Link

I also disabled antivirus and firewall, changing IP address, changing port , disable and enable usb debugging, and use another phone but problem still exist.

I know this problem is from my windows that blocking some things but 5555 port is open and not use in my pc and I changed and used many other port but still showed me same error.

My OS is Windows 10

Mostafa Rostami
  • 1,906
  • 20
  • 29
  • The error message indicates that the local port is already in use. Normally I would have expected that the local port is a random port but may be adb connect uses fixed ports? Check used ports e.g using `netstat -o -a -n -p tcp` – Robert Sep 27 '22 at 11:14
  • thank you for your reply I already check and change the port many times but nothing change. – Mostafa Rostami Sep 27 '22 at 12:31
  • I think you have changed only the remote port on Android side, but the error is because of a port conflict on Windows side. – Robert Sep 27 '22 at 12:53
  • I don't know what you mean by the Android side, but I changed the ADB connection port in Windows and then try to connect like this adb connect 6586, 5235, 5689,666,2321 but for all port show me port number and same error – Mostafa Rostami Sep 27 '22 at 13:00
  • The port you specify in the adb connect command is the port number on Android side. The IP+port specifies the TCP port which is open on Android side so that adb can connect to it. You don't need adb to test if this port is open. Use a different tcp tool like telnet, netcat (`nc`) or something like that. – Robert Sep 27 '22 at 13:10
  • I run below telnet command: >telnet 192.168.1.36:5555 and result is : Connecting To 192.168.1.36:5555...Could not open connection to the host, on port 23: Connect failed – Mostafa Rostami Sep 27 '22 at 13:38
  • The command for telnet is `telnet 192.168.1.36 5555` (no colon between server and port). – Robert Sep 27 '22 at 13:41
  • I test without colon Connecting To 192.168.1.36...Could not open connection to the host, on port 5555: Connect failed – Mostafa Rostami Sep 27 '22 at 14:45
  • Then you have the reason why it does not work, the network connection to the phone does not work (e.g. blocked by router) or adb connect mode has not been activated after the last device reboot. – Robert Sep 27 '22 at 15:09
  • thank you i tested with 3 different phones and all phones show me the same error so i check my router – Mostafa Rostami Sep 27 '22 at 15:18

1 Answers1

0

if you have read it well it should be fine.

but you can check again :

  1. Check your connection PC and phone, it is same ?
  2. Connect PC and phone with cable usb
  3. adb kill-server
  4. adb tcpip 5555 (and you need accept dialog permission)
  5. adb connect "your ip phone"
  • thank you for your reply bro I use all of this trick before in this thread: https://stackoverflow.com/questions/33462720/adb-unable-to-connect-to-192-168-1-105555 – Mostafa Rostami Sep 27 '22 at 12:34