LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

adb-pair

Pair with an Android device for wireless debugging

TLDR

Pair with a device using pairing code
$ adb pair [192.168.1.100]:[port]
copy

SYNOPSIS

adb pair host:port [pairingcode_]

DESCRIPTION

adb pair establishes a secure wireless debugging connection with an Android 11+ device using a pairing code. This eliminates the need for initial USB connection to enable wireless debugging.To use this feature, enable "Wireless debugging" in Developer Options on the device, then tap "Pair device with pairing code" to get the pairing port and code. After pairing, use adb connect with the connection port shown in Wireless debugging settings.

PARAMETERS

host

IP address of the Android device
port
Pairing port shown on the device (different from connection port)
pairing_code
Six-digit code shown on device (prompted if not provided)

INSTALL

sudo apt install adb
copy
sudo dnf install android-tools
copy
sudo pacman -S android-tools
copy
sudo apk add android-tools-adb
copy
sudo zypper install android-tools
copy
nix profile install nixpkgs#android-tools
copy

CAVEATS

Only available on Android 11 (API 30) and later. The pairing port is different from the connection port used with adb connect. Pairing codes expire quickly. Both devices must be on the same network.

HISTORY

Wireless debugging with pairing was introduced in Android 11, released in 2020. This feature was designed to improve the developer experience by removing the requirement for initial USB connection.

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid