Skip to content

Instantly share code, notes, and snippets.

@stfbee
Last active March 1, 2021 09:35
Show Gist options
  • Save stfbee/8e6d0da213c2c37d54f86938fc4c52ee to your computer and use it in GitHub Desktop.
Save stfbee/8e6d0da213c2c37d54f86938fc4c52ee to your computer and use it in GitHub Desktop.
adbw.sh

ADBW

(osx version)

How to use:

  • Save adbw.sh to your user's home directory
  • Make it executable: chmod a+x ~/adbw.sh
  • Create an alias for it: alias adbw="~/adbw.sh"
  • Use it: adbw

Note: only one android device needs to be connected to your Mac. It must have adb debugging enabled and the device must be connected to the same wifi network as your Mac

ip=`adb -d shell ip address | grep wlan0 | grep -Eio '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' | head -n 1`
adb -d tcpip 5555
adb connect $ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment