Stopping an Android app from console

hpique picture hpique · Jun 25, 2010 · Viewed 216.2k times · Source

Is it possible to stop an Android app from the console? Something like:

adb stop com.my.app.package

It would speed up our testing process so much. Right now we uninstall/install the app each time to make sure the manual test cases start with a clean state.

Answer

Enrico Ros picture Enrico Ros · Sep 5, 2012

The clean way of stopping the app is:

adb shell am force-stop com.my.app.package

This way you don't have to figure out the process ID.