Last active
August 29, 2015 14:12
-
-
Save j796160836/9b135a8de4c44846fd82 to your computer and use it in GitHub Desktop.
Use to connect android wear from android phone via bluetooth. Ref: http://developer.android.com/training/wearables/apps/bt-debugging.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEVICE=`adb devices | sed '/List of devices/d' | sed '/:4444/d' | sed '/emulator/d' | sed '/vbox86p/d' | head -n 1 | awk '{print $1}'` | |
if [ "$DEVICE" == "" ]; then | |
echo "Please conntect devices!" | |
exit 0 | |
else | |
echo "Devices: "$DEVICE | |
fi | |
adb -s $DEVICE forward tcp:4444 localabstract:/adb-hub; adb connect localhost:4444 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment