Skip to content

Instantly share code, notes, and snippets.

@chankruze
Created June 13, 2020 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chankruze/b4daaa7d37a27744839e8f4f6a4bb554 to your computer and use it in GitHub Desktop.
Save chankruze/b4daaa7d37a27744839e8f4f6a4bb554 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ $# -eq 0 ]
then
adb connect $(ip route show | grep "default via" | cut -d" " -f3)
else
adb connect $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment