Created
February 14, 2022 15:08
-
-
Save loloof64/a4651bdd809861908589d3d449e85dcd to your computer and use it in GitHub Desktop.
Disconnect android wifi Linux
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
echo 'Disconnect your android device by WIFI' | |
echo '-----------------------------------' | |
echo 'You must first ensure that :' | |
echo '1) Your device enable USB connection in the developper settings,' | |
echo '2) adb (Android debug bridge) command is in your path,' | |
echo '3) your device and your computer are on the same Wifi network.' | |
ip_adress=$(adb devices | grep -o -P '192\.\d+\.\d+\.\d+' | sed -n 's/\(.*\)/\1/p') | |
adb disconnect $ip_adress > /dev/null | |
echo 'Done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment