Skip to content

Instantly share code, notes, and snippets.

@256x
256x / adb-wifi
Created May 18, 2026 03:01
Connect to Android ADB wireless debugging automatically via mDNS
#!/usr/bin/env bash
# adb-wifi - Connect to Android devices via ADB wireless debugging (Android 11+)
#
# Automatically discovers devices on the LAN via mDNS (avahi),
# so no need to look up the port number manually — it changes every time.
#
# Dependencies: adb, avahi-utils (avahi-browse)
#
# Usage:
# 1. Enable "Wireless debugging" in Developer Options on your Android device