Created
May 29, 2018 14:47
-
-
Save kamleshkarwande/92a2421ee3f1881ed10d59949b6a4e4d to your computer and use it in GitHub Desktop.
shell script to disconnect android devices over wifi.
This file contains hidden or 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 | |
echo "This script works with ONLY one Android device connected to system !!!" | |
IP_PORT=$(adb devices | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | awk '{print $1}') | |
if [ -z "$IP_PORT" ]; then | |
echo "NO Device connected via wifi." | |
else | |
adb -s $IP_PORT usb | |
echo "ENJOY usb debug :)" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
connect script is at this link
https://gist.github.com/kamleshkarwande/fe3edd5d13757fcedd457ac4c0953a97