Skip to content

Instantly share code, notes, and snippets.

@padil-provi
padil-provi / adb_connect.sh
Created July 17, 2019 18:40 — forked from lucianomlima/adb_connect.sh
Connect to Android devices with ADB through wi-fi
function adb_connect {
# PORT used to connect. Default: 5555
PORT=${1:-5555}
# IP address from current device connected
IP_ADDRESS=`adb shell ip route | awk '{print $9}'`
echo "ADB connect to $IP_ADDRESS on port $PORT"
# Change connection from usb to tcpip using $PORT