5.3 KiB
ADB over Wi-Fi quick guide (with optional toolbox)
This page explains how to use ADB over Wi-Fi with scrcpy, on Windows, macOS, and Linux.
It also links to an optional third-party “Wi-Fi ADB Toolbox” that automates common tasks.
Note: scrcpy works over USB or Wi-Fi. Wi-Fi is convenient for mobility, but do not expose ADB over TCP to untrusted networks.
Prerequisites
- Android device with Developer options enabled.
- For Android ≤10: classic TCP/IP mode (
adb tcpip 5555). - For Android 11+ (recommended): Wireless debugging with pairing.
- For Android ≤10: classic TCP/IP mode (
- ADB (Android Platform Tools) available in your
PATH. - scrcpy installed and available in your
PATH. - Phone and computer on the same Wi-Fi/SSID (same LAN segment).
- Allow your firewall to let
adbcommunicate on the local network (port 5555 for classic TCP/IP mode, and a random port for pairing on Android 11+).
Quick commands
Windows (PowerShell or CMD)
A) Classic TCP/IP (Android ≤10 or if you prefer tcpip mode)
- Connect the phone via USB once and authorize the RSA prompt.
- Enable TCP mode:
adb devices adb tcpip 5555 - Find your phone IP (on the phone: Wi-Fi details) or via ADB:
adb shell ip -o -4 addr show wlan0 - Connect and start scrcpy:
adb connect <PHONE_IP>:5555 scrcpy - (Optional) Quality presets:
scrcpy --video-bit-rate 8M --max-size 1080 :: Default scrcpy --video-bit-rate 16M --max-size 1440 :: High scrcpy --video-bit-rate 32M --max-size 2160 :: Ultra - Return to USB later (when reconnected by cable):
adb -s <PHONE_IP>:5555 usb
B) Wireless debugging pairing (Android 11+)
- On the phone: Developer options → Wireless debugging → Pair device with pairing code.
Note the IP:PORT and 6-digit pairing code. - Pair:
adb pair <PHONE_IP>:<PAIR_PORT> (enter the 6-digit code when prompted) - Connect the device endpoint (usually
:5555):adb connect <PHONE_IP>:5555 scrcpy
macOS / Linux (Terminal)
Commands are the same:
A) Classic TCP/IP
adb devices
adb tcpip 5555
adb shell ip -o -4 addr show wlan0
adb connect <PHONE_IP>:5555
scrcpy
B) Wireless debugging (Android 11+)
adb pair <PHONE_IP>:<PAIR_PORT> # enter the 6-digit code
adb connect <PHONE_IP>:5555
scrcpy
Optional helper (third-party)
For a friendlier workflow (menus, presets, JSON inventory, and cross-platform helper), see:
- Wi-Fi ADB Toolbox (third-party):
https://github.com/kakrusliandika/Scrcpy-Mode-Wifi
This project automates the steps above (connect, list, presets, disconnect, etc.).
It is external to scrcpy; please report issues and updates there.
Network & security notes
- Local network only. Avoid enabling ADB TCP on public or untrusted networks.
- Unique IP per device. If multiple phones share the same hotspot/router IP range (e.g. captive hotspot or phone-as-hotspot), ensure each device gets a unique IP. Duplicate IPs will cause conflicts.
- Firewalls. Allow
adbthrough your OS firewall for private networks. Classic TCP mode uses 5555/TCP; Android 11 pairing uses a random TCP port for the pairing step. - Disable when done. For classic TCP mode, switch back to USB:
Or just reboot the device.adb -s <PHONE_IP>:5555 usb
Troubleshooting
-
device unauthorized
Reconnect USB, accept the RSA fingerprint prompt. You can also revoke authorizations on the phone (Developer options → Revoke USB debugging authorizations), then re-authorize. -
offlineor not listed
Toggle Wireless debugging off/on (Android 11+), or run:adb kill-server adb start-server adb devicesEnsure phone and PC are on the same SSID.
-
Cannot find phone IP
Use:adb shell ip -o -4 addr show wlan0 adb shell ip -o -4 addr show # check other Wi-Fi/P2P interfaces (e.g. p2p0)Or read the IP from the phone’s Wi-Fi settings.
-
Multiple devices error (
more than one device/emulator)
Specify the target with-s, e.g.:adb -s <PHONE_IP>:5555 shell getprop ro.product.model scrcpy -s <PHONE_IP>:5555 -
Pairing fails (Android 11+)
Ensure you use the pairing port foradb pair(not 5555), and the 6-digit code shown on the phone. After pairing, connect to<PHONE_IP>:5555. -
scrcpy not found
Install scrcpy and ensure it’s inPATH. Launchscrcpy -vto verify. -
HEVC/H.265 option doesn't work
The device must support HEVC encoding. If not, omit--video-codec=h265.
Useful commands (reference)
# List devices (USB/TCP)
adb devices
# Check state for a specific endpoint
adb -s <PHONE_IP>:5555 get-state
# Disconnect a specific endpoint or all
adb disconnect <PHONE_IP>:5555
adb disconnect
# Classic mode: enable/disable TCP server on device
adb tcpip 5555
adb -s <PHONE_IP>:5555 usb
# scrcpy examples
scrcpy # defaults
scrcpy --video-bit-rate 8M --max-size 1080
scrcpy --always-on-top --fullscreen
scrcpy --record session.mp4
This page links to a third-party helper for convenience. It is not part of scrcpy and is maintained separately.