Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
shell script to disconnect android devices over wifi.
#!/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
@kamleshkarwande

This comment has been minimized.

Copy link
Owner Author

commented May 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.