Skip to content

Instantly share code, notes, and snippets.

@alahammad
Created August 29, 2017 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alahammad/351d1527cd35a275f003267c072563f0 to your computer and use it in GitHub Desktop.
Save alahammad/351d1527cd35a275f003267c072563f0 to your computer and use it in GitHub Desktop.
ADB shortcut for mac users, just change adb path
#!/bin/bash
clear
echo " ____ _____ ____ _____ _ _ _ ____
/ / / /\ | __ \| _ \ / ____| | | | | | \ \ \
/ / / / \ | | | | |_) | | (___ | |__ ___ _ __| |_ ___ _ _| |_ \ \ \
< < < / /\ \ | | | | _ < \___ \| '_ \ / _ \| '__| __/ __| | | | __| > > >
\ \ \ / ____ \| |__| | |_) | ____) | | | | (_) | | | || (__| |_| | |_ / / /
\_\_\ /_/ \_\_____/|____/ |_____/|_| |_|\___/|_| \__\___|\__,_|\__| /_/_/
"
cd /Users/carriage/Library/Android/sdk/platform-tools
PS3='Please enter your choice: '
options=("List of devices" "Install APK" "Kill ADB" "Start ADB" "Quit")
select opt in "${options[@]}"
do
case $opt in
"List of devices")
./adb devices
;;
"Install APK")
echo "Enter apk path ::> "
read apkPath
./adb install $apkPath
sleep 0.5
;;
"Kill ADB")
echo "Killing adb server .."
./adb kill-server
;;
"Start ADB")
echo "Killing adb server .."
./adb kill-server
;;
"Quit")
break
;;
*) echo invalid option;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment