Skip to content

Instantly share code, notes, and snippets.

@darwind
Created October 23, 2018 11:11
Show Gist options
  • Save darwind/c1ebef0de54d775ed1b48c9dd5e7f9e0 to your computer and use it in GitHub Desktop.
Save darwind/c1ebef0de54d775ed1b48c9dd5e7f9e0 to your computer and use it in GitHub Desktop.
#1. Create a file: adb_restart.sh and put these lines in:
#!/bin/sh
adb kill-server
adb start-server
adb devices
#2. Make the bashscript executable:
chmod a+x adb_restart.sh
#3. Move the file into: /usr/local/bin:
mv restart_adb.sh /usr/local/bin/adb_restart.sh
#4. Restart the terminal and you're now able to run `adb_restart.sh` from anywhere.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment