强制停止"喜欢&QUOT的Android ADB停止应用程序命令;对于非植根设备 [英] Android ADB stop application command like "force-stop" for non rooted device
问题描述
我试图阻止在Android 2.3.7设备应用程序。但是,在这个版本的Android我不能使用强制停止命令。你知不知道任何其他的方式来关闭非植根设备上的应用程序?
I'm trying to stop application on Android 2.3.7 device. But in this version of Android I can't use "force-stop" command. Do you know any other ways to close application on non rooted device?
推荐答案
第一种方式
需要root
的
使用杀
:
The first way
Needs root
Use kill
:
亚行外壳PS
=>将列出设备上所有正在运行的进程及其进程ID
亚行外壳杀< PID>
=>代替&LT的; PID>
使用应用程序的进程id
adb shell ps
=> Will list all running processes on the device and their process ids
adb shell kill <PID>
=> Instead of <PID>
use process id of your application
第二种方法
在Eclipse开放 DDMS
观点。
在设备
查看你会发现所有正在运行的进程。
选择过程,然后点击停止
。
The second way
In Eclipse open DDMS
perspective.
In Devices
view you will find all running processes.
Choose the process and click on Stop
.
第三条道路
这会杀了一个应用程序的唯一后台进程。的
亚行外壳时杀[选项]&LT;包装&GT;
=>杀死(应用程序的包名)相关联的所有进程。该命令杀死仅是安全的杀人,而不会影响用户体验的过程。
选项有:
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.
第四种方式
需要root
的
亚行外壳时禁用&LT;包装&GT;
=>禁用指定的包或组件(写为包/班)
The fourth way
Needs root
adb shell pm disable <PACKAGE>
=> Disable the given package or component (written as "package/class").
第五种
需要注意的是运行方式仅支持了与调试密钥签名的应用程序。
的
运行为&lt;包名称&gt;杀&LT; PID&GT;
第六方式
在蜂窝的
介绍
亚行外壳时强制停止&LT;包装&GT;
=>强制停止与相关联的一切(应用程序的包名)
The sixth way
Introduced in Honeycomb
adb shell am force-stop <PACKAGE>
=> Force stop everything associated with (the app's package name).
PS:我知道,第六种方法不适合你,但我认为这是很重要的这个方法添加到列表中,让每个人都知道它
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.
这篇关于强制停止&QUOT;喜欢&QUOT的Android ADB停止应用程序命令;对于非植根设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!