Skip to content

Instantly share code, notes, and snippets.

@seokju-na
Forked from toori67/adbwifi.sh
Created November 1, 2019 09:31
Show Gist options
  • Save seokju-na/28b91fa9cf0bd7c9a67bc7b9c99353b3 to your computer and use it in GitHub Desktop.
Save seokju-na/28b91fa9cf0bd7c9a67bc7b9c99353b3 to your computer and use it in GitHub Desktop.
Android adb wifi debug shell script.
#!/bin/bash
adb kill-server
adb start-server
echo "Connect device with usb cable"
adb wait-for-device
ANDROID_IP=`adb shell ifconfig wlan0 | awk '/inet addr/ {gsub("addr:", "", $2); print $2}'`
adb tcpip 5555
adb connect $ANDROID_IP:5555
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment