Skip to content

Instantly share code, notes, and snippets.

@bartwell
bartwell / ConnectWiFiAdb.sh
Created January 26, 2025 10:58
Script for quick connection using `adb pair` and `adb connect` on Mac
#!/bin/bash
show_help() {
cat <<EOF
Usage: $0 [IP_ADDRESS] [PAIR_PORT] [PAIR_CODE] [CONNECT_PORT] [--restart-server]
Arguments:
IP_ADDRESS Phone's IP address (e.g., 192.168.0.101)
PAIR_PORT Port for pairing (e.g., 46155)
PAIR_CODE Pairing code (e.g., 830119)