Skip to content

Instantly share code, notes, and snippets.

@jhansche
Created August 19, 2016 15:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhansche/e0aad87ef72bee592c007b15c588f51c to your computer and use it in GitHub Desktop.
Save jhansche/e0aad87ef72bee592c007b15c588f51c to your computer and use it in GitHub Desktop.
#!/bin/sh -e
adb start-server || adb start-server
echo "adb is started"
date
while [ "$(adb shell echo 1)" ]; do sleep 5; done
date
echo "adb is broken, restarting:"
adb kill-server
adb start-server || adb start-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment