Last active
July 23, 2016 14:39
-
-
Save rajat1saxena/f46cd326e68da19c6221f1ae5d6b4eac 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