Taylor
Taylor

Reputation: 3141

How to kill any android applications from a terminal shortcut?

I have this new app that I got from the Play store which allows me to make shortcuts for certain actions. For my likings, I want to make it so that if I hold the volume up button, it would kill the app. (Not minimize, but kill). It doesn't have that option but it does have an option to have a terminal emulation shortcut.

Please help. Thanks

Upvotes: 1

Views: 6033

Answers (2)

Jorgesys
Jorgesys

Reputation: 126455

killing the app:

  adb shell am kill com.myapp.package

stopping the app using adb:

  adb shell am force-stop com.myapp.package

more info:

https://developer.android.com/tools/help/adb.html#am

Upvotes: 3

Mandav Prakash
Mandav Prakash

Reputation: 29

You can use am force-stop <package name> and am kill <package name>

Upvotes: 0

Related Questions