How to Use ADB Commands over Wi-Fi: ADB Nexus Guide
|

ADB Wireless Shell: Run ADB Commands over Wi-Fi on Android

An ADB wireless shell lets you run Android Debug Bridge commands on a phone over Wi-Fi, with no USB cable attached. You get the same shell you would get from a cable, on the same network instead of the same desk.

There are two ways in, and which one you need depends entirely on your Android version. This guide covers both, plus the option most guides skip: doing it without a computer at all.

What you actually need

  • Developer options enabled on the phone
  • The phone and the other device on the same Wi-Fi network
  • Android 11 or newer if you want to skip the cable entirely
  • A cable once, only if you are on Android 10 or older

That last point catches people out. Wireless debugging as a built-in pairing feature arrived in Android 11. Before that, wireless ADB existed but always had to be switched on through a cable first.

Android 11 and newer: no cable at any point

Enable Developer options first. Open Settings, go to About phone, and tap Build number seven times. You will see a countdown and then a confirmation.

Now open Developer options and turn on Wireless debugging. Tap into it, not just the toggle, and choose Pair device with pairing code. The phone shows an IP address, a port, and a six digit code. That screen has to stay open while you pair.

On the computer:

adb pair 192.168.1.42:37105

Use the address and port from the pairing screen, not the ones above. ADB asks for the six digit code. Enter it and you should see a confirmation that the device is paired.

Pairing is not connecting. Go back to the Wireless debugging screen, where a second address and a different port are shown under the device name, and connect to that one:

adb connect 192.168.1.42:41235
adb devices

Once the device appears in the list, you have a shell:

adb shell

The pairing survives reboots. The connection does not, so expect to run adb connect again after a restart, and expect the port to change.

Android 10 and older: one cable, then wireless

Plug the phone in, accept the USB debugging prompt, then:

adb devices
adb tcpip 5555
adb connect 192.168.1.42:5555

Find the phone’s IP under Settings, About phone, Status, or in your Wi-Fi network details. After adb connect reports success you can unplug the cable and keep working.

This mode ends at reboot. The phone goes back to USB mode and you need the cable again to restart it.

Doing it without a computer

The pairing flow above does not care whether the thing on the other end is a laptop. Android 11 and newer can pair with another Android device, or with itself, which is where dedicated apps come in.

Two situations where this is the practical option:

  • You want a shell on your own phone and there is no computer nearby
  • You are working on a second device, a tablet, or a TV box, and want to drive it from a phone

ADB Nexus handles the pairing and connection steps on device, so the six digit code and the port juggling happen in one screen instead of across a phone and a terminal. It runs the same ADB commands underneath. Nothing about the protocol changes, only where you type.

When it will not connect

Connection refused. The port changed. Wireless debugging shows a new port after most reboots, and after some network changes. Read it again and reconnect.

Device shows as unauthorized. The pairing was lost or never completed. Pair again with a fresh code.

Device is not found at all. Both ends are usually on different networks, or the router has client isolation turned on, which is common on guest Wi-Fi and in hotels. Try a phone hotspot to rule the network out.

It worked yesterday and not today. Check whether the phone’s IP has changed. Most home routers hand out addresses on a lease and will move a device after it has been off the network for a while.

What a wireless shell is good for

Anything you would do over a cable. Reading logs with adb logcat, checking what is installed with adb shell pm list packages, pulling files, inspecting device properties with adb shell getprop. The advantage is not speed, it is that the phone can be in your hand, or across the room, or plugged into a charger while you work on it.

It is worth knowing the limits too. Wireless ADB is slower than USB for large file transfers, and an unstable Wi-Fi connection will drop the shell mid command. For pulling a few hundred megabytes, use the cable.

Watch it instead

The video below walks through the Android 11 pairing flow end to end, including the part where the port changes and the connection needs redoing.

Similar Posts

Leave a Reply