Skip to content

Instantly share code, notes, and snippets.

kamleshkarwande

Block or report user

Report or block kamleshkarwande

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kamleshkarwande
kamleshkarwande / disconnectWifiAndroidShell.sh
Created May 29, 2018
shell script to disconnect android devices over wifi.
View disconnectWifiAndroidShell.sh
#!/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
kamleshkarwande / connectWifiAndroidShell.sh
Last active Nov 25, 2018
shell script to connect android devices over wifi.
View connectWifiAndroidShell.sh
#!/bin/bash
echo "This script works with ONLY one Android device connected to system !!!"
echo "Killing adb"
adb kill-server
sleep 2
PORT_NO=6969
CONNETED_DEVICES=$(adb devices | wc -l)
if [ "$CONNETED_DEVICES" -le 2 ]; then
echo "NO Android device connected to your machine via USB."
else
You can’t perform that action at this time.