Last active
August 25, 2024 16:08
-
-
Save mlykotom/18d48ec6cc75f935ed7658867cedad5f to your computer and use it in GitHub Desktop.
Script for killing Android app (as system would)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Provide package of your application (com.example.myapp) | |
PACKAGE=$1 | |
# First, put your app to background and then run this script | |
echo "Killing $PACKAGE" | |
adb shell ps | grep $PACKAGE | awk '{print $2}' | xargs adb shell run-as $PACKAGE kill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.