wadb

Connect an Android 11+ device over ADB Wi-Fi by scanning a QR code from your terminal.
Same protocol as Android Studio's Pair device using Wi-Fi, but without launching the IDE — just run wadb, scan, done.
Install
Requires Go (see go.mod for the minimum version) and adb from Android platform-tools.
go install github.com/lindevhard/wadb@latest
Or build from a clone:
git clone https://github.com/LinDevHard/wadb && cd wadb
go build -o wadb .
Usage
wadb
A QR code prints in the terminal. On your phone open
Settings → Developer options → Wireless debugging → Pair device with QR code and scan it. wadb will pair and connect automatically, then exit.
Both the phone and the host must be on the same Wi-Fi network (no AP isolation between clients), and Wireless debugging must be enabled in Developer options.
How it works
wadb locates the local adb binary.
- It generates a single-use service name (
studio-<random>) and password, then renders them as a QR code with payload WIFI:T:ADB;S:...;P:...;; — the same format Android Studio uses.
- When the phone scans the QR, it advertises
_adb-tls-pairing._tcp via mDNS. wadb matches the announce by instance name and runs adb pair.
- After pairing succeeds, the phone advertises
_adb-tls-connect._tcp. wadb runs adb connect against it and prints the result.
The actual TLS pairing handshake is handled by adb pair; wadb only orchestrates discovery and credential generation.
adb discovery
wadb searches for adb in this order and uses the first match:
$ANDROID_HOME/platform-tools/adb
$ANDROID_SDK_ROOT/platform-tools/adb
~/Library/Android/sdk/platform-tools/adb (macOS Android Studio default)
~/Android/Sdk/platform-tools/adb (Linux default)
adb on $PATH (e.g. Homebrew android-platform-tools)
/opt/homebrew/share/android-commandlinetools/platform-tools/adb
If none match, set ANDROID_HOME or install platform-tools.
Troubleshooting
| Symptom |
Likely cause |
| "did not see device announce within 2m" |
Phone could not reach the host over mDNS. Check same Wi-Fi subnet, no AP isolation, firewall not blocking UDP 5353. |
adb pair fails immediately |
Stale daemon. Run adb kill-server and retry. |
| Connect timeout after a successful pair |
Some Android builds delay the connect announce. Re-run wadb, or run adb connect <ip>:<port> manually once Wireless debugging shows the device's port. |
Tested on macOS. Linux should work as-is. Windows adb discovery is partially implemented but unverified — PRs welcome.
Contributing
See CONTRIBUTING.md and the Code of Conduct.
License
MIT