LinuxCommandLibrary

adb-pair

Pair wirelessly with an Android device

TLDR

View documentation for adb pair

$ tldr adb connect
copy

SYNOPSIS

adb pair <ipaddr>:<port> [<pairing_code>]

PARAMETERS

<ipaddr>:<port>
    Required: Device's IP address and TCP port from Wireless debugging screen (e.g., 192.168.1.100:37101).

<pairing_code>
    Optional: 6-digit numeric code. Omitted prompts interactive entry.

-h, --help
    Display usage help.

DESCRIPTION

The adb pair command, part of Android Debug Bridge (ADB) from platform-tools, establishes a secure pairing between a host computer and an Android device (API 30+) over Wi-Fi for wireless debugging. It replaces insecure USB-only or manual TCP/IP setups.

Prerequisites: Enable Developer options on the device, toggle Wireless debugging, and select Pair device with pairing code. Note the displayed ipaddr:port and 6-digit pairing code (expires quickly).

Run adb pair ipaddr:port—enter code when prompted. Or supply directly: adb pair ipaddr:port 123456. Success yields Successfully paired. Follow with adb connect ipaddr:port for active debugging session.

Supports localhost for emulators or forwarded ports. Pairing persists until revoked in device settings, authorizing repeated connections. Enhances productivity by eliminating USB tethering.

CAVEATS

Android 11+ only. Host/device same network (or localhost). Code expires in ~3 min. Revoke pairs in device settings. Fails if firewall blocks port or debugging disabled. Use adb kill-server if stuck.

EXAMPLE

adb pair 192.168.1.100:37101
Successfully paired to 192.168.1.100:37101 [guid=adb-XXXX]

adb pair localhost:5555 123456 (for emulator/port-forward)

Verify: adb devices

TROUBLESHOOTING

No prompt? Ensure adb start-server. Connection refused: Check firewall/port. Multiple devices: Use after adb connect.

HISTORY

Introduced in Android SDK Platform-Tools 30.0.4 (March 2020) with Android 11 for secure Wi-Fi debugging, replacing adb tcpip USB prerequisite. Enhanced in later versions with better error handling.

SEE ALSO

adb(1), adb connect(1), adb devices(1), adb tcpip(1)

Copied to clipboard