Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Connect Android to Wireless ADB for Screen Mirroring

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Wireless ADB (Android Debug Bridge) lets you connect your Android device to your computer over Wi-Fi instead of a USB cable. This is handy for developers and tinkerers who want to run commands, install apps, or mirror the phone's screen on a PC without being tethered. This guide walks you through the setup, from enabling developer options to establishing a wireless connection and starting a screen mirror session.

What You'll Need

  • An Android phone or tablet with Developer Options enabled (Android 11 or newer recommended).
  • A computer (Windows, macOS, or Linux) with ADB installed. If you don't have it, install the platform-tools from Google's official SDK site.
  • Both devices on the same Wi-Fi network. For best results, use a 5 GHz band and avoid guest networks that block device-to-device traffic.
  • A USB cable for the initial setup (only needed once).
  • Optional: A screen mirroring tool like scrcpy (free, open-source) to display and control the phone from your computer.

Step-by-Step

  1. Enable Developer Options on your Android device. Go to Settings > About Phone and tap Build Number seven times. You'll see a message that you're now a developer.
  2. Turn on Wireless ADB. In Settings > Developer Options, find Wireless debugging and toggle it on. On some devices it's called ADB over network. If prompted, confirm that you want to allow wireless debugging.
  3. Find your device's IP address and port. Tap Wireless debugging and then Pair device with pairing code. Note the IP address and port shown (e.g., 192.168.1.42:37000). You'll also see a 6-digit pairing code that changes every few minutes.
  4. On your computer, open a terminal/command prompt. Navigate to the folder where ADB is installed (or add it to your PATH).
  5. Pair your computer with the phone. Run the command: adb pair IP:PORT (use the IP and port from step 3). When prompted, enter the 6-digit code. You should see a success message.
  6. Connect to the device wirelessly. After pairing, you'll see a new IP:port in the Wireless debugging screen (the one without the pairing code). Run: adb connect IP:PORT using that address.
  7. Verify the connection. Type adb devices. You should see your device listed as device (not unauthorized or offline).
  8. Start screen mirroring. If you have scrcpy installed, simply run scrcpy in the terminal. The phone's screen will appear in a window on your computer, and you can control it with your mouse and keyboard.
  9. Optional: Disconnect USB. Once the wireless connection is established, you can unplug the USB cable. The wireless session remains active until you reboot the phone or disable wireless debugging.

Common Mistakes

  • Using the wrong port. The pairing port and the connection port are different. The pairing port is shown only when you tap Pair device with pairing code. The connection port is listed right under Wireless debugging.
  • Entering the pairing code too late. The code expires after a few minutes. If it fails, tap Refresh to get a new code and port.
  • Firewall blocking ADB. Windows Firewall or third-party security software may block ADB. Allow adb.exe through the firewall or temporarily disable it to test.
  • Not being on the same network. If the phone is on mobile data or a different Wi-Fi network, the connection will fail. Use the same router and, if possible, the same band (2.4 GHz vs 5 GHz).
  • Forgetting to authorize the computer. When you first connect via USB, you must accept the RSA key fingerprint on the phone. If you skip this, wireless pairing won't work.

Tips

  • Set a static IP for your phone in your router's DHCP settings. This prevents the IP from changing after a reboot, which would break the ADB connection.
  • Use a 5 GHz Wi-Fi network for lower latency and smoother mirroring, especially if you're playing games or watching video.
  • Keep the screen on while mirroring. Some devices turn off Wi-Fi when the screen sleeps, which disconnects ADB.
  • Create a shortcut for the connect command. For example, on Windows you can create a batch file with adb connect 192.168.1.42:37000.
  • Update ADB regularly. Older versions may have bugs with wireless pairing. Download the latest platform-tools from Google.

Troubleshooting

Connection fails with “cannot connect to 192.168.x.x:port”. Check that both devices are on the same network. Ping the phone's IP from the computer to verify connectivity. If ping fails, the router may have AP isolation enabled—disable it in router settings.

“Unauthorized” when running adb devices. On the phone, a dialog may appear asking to allow USB debugging. Accept it. If it doesn't appear, revoke USB debugging authorizations in Developer Options and re-pair.

Pairing fails with “wrong code”. The code changes every few minutes. Tap Refresh on the phone and try again immediately. Also make sure you're entering the code exactly as shown, without spaces.

ADB keeps disconnecting. This is often due to Wi-Fi power saving. On the phone, go to Wi-Fi settings > Advanced > Keep Wi-Fi on during sleep and set to Always. Also, check if your router has a “client isolation” feature that blocks device-to-device communication.

Screen mirroring is laggy or blurry. Lower the resolution and bitrate in scrcpy. For example: scrcpy --max-size 1024 --max-bit-rate 4M. Also, close other bandwidth-heavy apps on the computer.

Wireless debugging option is missing. This feature requires Android 11 or newer. If your device is older, you can still use ADB over Wi-Fi by rooting or using a USB connection with an app like ADB over Wi-Fi (requires root).

Frequently Asked Questions

Do I need a USB cable every time?

No. The USB cable is only needed for the first pairing. After that, as long as the phone's IP doesn't change and wireless debugging stays on, you can connect directly via adb connect.

Can I mirror the screen without a computer?

No, this method requires a computer to run ADB and a mirroring tool like scrcpy. If you want to mirror to a TV or another phone, use built-in casting features or apps like Google Home.

Is wireless ADB faster than USB?

No. USB is generally faster and more stable. Wireless ADB is convenient but may have higher latency, especially for file transfers or screen mirroring. For heavy tasks, stick to USB.

Will this work on a Mac or Linux?

Yes. ADB and scrcpy work on Windows, macOS, and Linux. The commands are the same, but you may need to install drivers or use ./adb instead of adb on Linux/macOS if not in PATH.

Is it safe to leave wireless debugging on?

It's generally safe on a trusted home network, but it does expose an open port. If you're on a public network, disable wireless debugging when not in use to prevent unauthorized access.

Can I use wireless ADB to install apps?

Yes. Once connected, you can run adb install app.apk just like with USB. This is useful for testing apps without plugging in the cable.