ADB to Android device over WiFi

  • Thread starter Swamp Thing
  • Start date
  • #1
Swamp Thing
Insights Author
914
586
I have enabled Wireless Debugging on my Android phone. The wireless debugging setup screen displays an IP address and a port number.

When I do this:
Code:
 adb connect 192.168.1.22:33237
... it says "failed to connect ... connection refused".

Why is that?

Edit:
  • BTW, I am able to connect ADB to the phone via USB.
  • It I do adb tcpip 33237 it says "no devices/emulators found"
 
Last edited:
Computer science news on Phys.org
  • #2
Security?... so "just anybody" can not eavesdrop?
 
  • #4
It's been quite a while, but I thought the correct port for ADB wirelessly would be 5555.
 
  • #5
Svein said:
33237 is the port number (a very unusual one). https://isc.sans.edu/data/port.html?port=33237
Yes, it'a a port number. Each time you enable Wireless Degugging, it comes up with a new random port number.

1691977693466.jpeg


AngryBeavers said:
It's been quite a while, but I thought the correct port for ADB wirelessly would be 5555.
It depends. See below.Some digging and trial-and-error later, I have learned that there are two ways to do ADB over WiFi. There is the classic/legacy way that has existed for years, that uses port 5555. And there is a newer way based on "pairing" with a passcode/QR code. The new way uses random port numbers that the phone tells you to use. Newer ADB clients support a "pair" command that does this.

I have to use the older method because the ADB client for Raspberry Pi OS (which I'm using) hasn't caught up with the times. In the older method you have to first connect on USB, then do
Code:
 adb tcpip 5555 
adb connect 192.168.1.5:5555
after which adb devices will show a USB session and a Wifi session.

At this point you just pull the USB plug and continue on WiFi.
 

Similar threads

  • Computing and Technology
Replies
3
Views
2K
Replies
6
Views
3K
  • Computing and Technology
2
Replies
43
Views
3K
Replies
3
Views
2K
  • Computing and Technology
Replies
15
Views
4K
  • Computing and Technology
Replies
2
Views
6K
  • Programming and Computer Science
Replies
1
Views
763
  • Computing and Technology
Replies
3
Views
13K
Replies
5
Views
9K
  • Programming and Computer Science
Replies
2
Views
942
Back
Top