Skip to content

Instantly share code, notes, and snippets.

@toori67
Last active November 1, 2019 09:31
Show Gist options
  • Save toori67/3be63bed9ef5b8c17ba775c0fdbc1ae7 to your computer and use it in GitHub Desktop.
Save toori67/3be63bed9ef5b8c17ba775c0fdbc1ae7 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