ADB to Android device over WiFi

  • Thread starter Thread starter Swamp Thing
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around connecting an Android device to ADB (Android Debug Bridge) over WiFi, focusing on issues related to connection failures, port numbers, and methods of wireless debugging. Participants explore both legacy and newer methods of ADB over WiFi.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant reports a connection failure when attempting to connect ADB wirelessly using a specific IP address and port number, despite being able to connect via USB.
  • Another participant raises a question about security concerns related to wireless debugging.
  • Multiple participants note that the port number 33237 is unusual, with one providing a link to a resource about port numbers.
  • There is a suggestion that the traditional port for ADB over WiFi is 5555, but this is contested by another participant who explains that newer methods use random port numbers assigned by the device.
  • A participant describes the older method of ADB over WiFi, which requires an initial USB connection and the use of port 5555, contrasting it with the newer method that involves pairing with a passcode or QR code.

Areas of Agreement / Disagreement

Participants express differing views on the appropriate port number for ADB over WiFi, with some advocating for the traditional port 5555 and others pointing out the use of random ports in newer methods. The discussion remains unresolved regarding the best approach to take.

Contextual Notes

There are limitations in understanding the specific configurations of ADB clients across different operating systems, as well as the implications of using different methods for wireless debugging.

Swamp Thing
Insights Author
Messages
1,047
Reaction score
786
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
Security?... so "just anybody" can not eavesdrop?
 
It's been quite a while, but I thought the correct port for ADB wirelessly would be 5555.
 
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

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
6
Views
5K
  • · Replies 43 ·
2
Replies
43
Views
5K
  • · Replies 2 ·
Replies
2
Views
6K
Replies
3
Views
4K
  • · Replies 15 ·
Replies
15
Views
6K
  • · Replies 3 ·
Replies
3
Views
14K