Show HN: Adbqr – ADB pair via QR code from the CLI

github.com

1 point by kristjan 2 hours ago

I got tired of typing my phone's ADB pairing info, but also don't usually have Android Studio open to display a QR code, so I Clauded up an all-bash (with qrencode installed) command to do it straight from the CLI.

> brew install kristjan/tap/adbqr

All that's needed is a join-network style string written through qrencode for the phone to scan:

> WIFI:T:ADB;S:<service>;P:<pairing-code>;;

For sake of pleasantness, if you're in iTerm2 or a terminal that supports Kitty, it'll print crisp imagery. Otherwise it falls back to character-level blocks. Then the process listens for an mDNS announcement from the phone and runs the `adb pair` command for you.

Last thing I added is from when I tried to run it on a public network with client isolation turned on, so the tool tries to notice warning signs and give you a heads up. It's very basic, so if anyone knows clever ways to detect that kind of setup, I'd love to learn it.