Skip to content

Instantly share code, notes, and snippets.

@guysmoilov
Created June 13, 2016 13:53
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 guysmoilov/f6ecc9f29a9308bd1d1c0faea20cb87d to your computer and use it in GitHub Desktop.
Save guysmoilov/f6ecc9f29a9308bd1d1c0faea20cb87d to your computer and use it in GitHub Desktop.
import subprocess
import sys
pslist = subprocess.check_output("adb shell ps " + sys.argv[1]).decode("utf-8").split()
if len(pslist) > 8:
pid = pslist[9]
print("killing " + pid)
subprocess.check_call("adb shell kill " + pid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment