Skip to content

Instantly share code, notes, and snippets.

@HassanMirza01
Created June 16, 2018 12:58
Show Gist options
  • Save HassanMirza01/219409295d5a673a40a1c64e5a2f6ae7 to your computer and use it in GitHub Desktop.
Save HassanMirza01/219409295d5a673a40a1c64e5a2f6ae7 to your computer and use it in GitHub Desktop.
tool
if [ "`adb get-state 2>&1 | grep device`" == "" ]; then #get-state either give "unknown" or "device" in its output
echo -e " ${bblue}No Device Connected in adb Mode!" #and in 18.04, inplace of "unknown" it gives "Error: No Devices found"
echo -e " Connect it again or Enable USB Debugging...${nc}"
echo
echo -e " ${bblue}Press Enter to Continue${nc}"
read
start
fi
if [ "`adb get-state 2>&1 | grep device`" == "" ]; then #get-state either give "unknown" or "device" in its output
echo -e " ${bblue}No Device Connected in adb Mode!" #and in 18.04, inplace of "unknown" it gives "Error: No Devices found"
echo -e " Connect it again or Enable USB Debugging...${nc}"
echo
echo -e " ${bblue}Press Enter to Continue${nc}"
read
start
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment