Android ADB stop application command like “force-stop” for non rooted device
The first way
Needs root
Use kill
:
adb shell ps
=> Will list all running processes on the device and their process idsadb shell kill <PID>
=> Instead of <PID>
use process id of your application
The second way
In Eclipse open DDMS
perspective.
In Devices
view you will find all running processes.
Choose the process and click on Stop
.
The third way
It will kill only background process of an application.
adb shell am kill [options] <PACKAGE>
=> Kill all processes associated with (the app's package name). This command kills only processes that are safe to kill and that will not impact the user experience.
Options are:
--user | all | current: Specify user whose processes to kill; all users if not specified.
The fourth way
Needs rootadb shell pm disable <PACKAGE>
=> Disable the given package or component (written as "package/class").
The fifth way
Note that run-as is only supported for apps that are signed with debug keys.run-as <package-name> kill <pid>
The sixth way
Introduced in Honeycombadb shell am force-stop <PACKAGE>
=> Force stop everything associated with (the app's package name).
P.S.: I know that the sixth method didn't work for you, but I think that it's important to add this method to the list, so everyone will know it.
'Android' 카테고리의 다른 글
Android default volume (0) | 2017.09.25 |
---|---|
The status of android system properties while wifi connect network. (0) | 2017.09.05 |
안드로이드 app sign 하기, jks 만들기 (0) | 2017.08.24 |