Created
July 25, 2016 06:15
-
-
Save adib2149/e3ee9f44173b15ea7b3bd3013d168b45 to your computer and use it in GitHub Desktop.
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 | |
# Get the IP of the connected android device | |
IP=`adb shell netcfg | grep wlan0 | awk '{ print $3 }' | awk -F'/' '{ print $1 }'` | |
# Port used for connecting, on device. Change as required | |
DEBUG_PORT='5555' | |
# Start the adb as tcpip deamon | |
adb tcpip $DEBUG_PORT | |
# Connect wirelessly using above settings | |
adb connect $IP:$DEBUG_PORT | |
echo 'You can use the following command, in case you get disconnected as soon as you disconnect the USB\n' | |
COMMAND="adb connect $IP:$DEBUG_PORT" | |
echo $COMMAND | |
echo 'You are good to go\n' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment