Search code examples
android-studioadb

How to use adb shell terminate application like android studio's terminate application?


enter image description here

When i click terminate application, it just stop the first Activity and then start prior Activity by itself. What terminate application do? How to use adb do terminate application?


Solution

  • Terminate Application closes or terminates the current application which is either in foreground, or the application which is selected & connected via ADB.

    To terminate an app from adb:

    ./adb shell am force-stop <yourp-package-name>