从ADB SHELL杀死一个进程 [英] Kill a process from ADB SHELL

查看:2020
本文介绍了从ADB SHELL杀死一个进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。

我已经将我的galaxy s2连接到电脑并安装了ADT Bundle。

我正在打开CMD并访问adb shell。

我可以编写像toppsdevicesmkdir这样的命令

然而Kill命令无效。

我正在运行来自eclypse的android项目,我能够看到它的进程ID。但是当我键入

kill 14421时,它表示不允许操作。

有没有办法从adb shell中删除进程?

我搜索了很多但没有找到任何内容。

Hello.
I have connected my galaxy s2 to the pc and installed ADT Bundle.
I am opening CMD and accessing the adb shell.
I am able to write commands like "top" "ps" "devices" "mkdir"
However "Kill" command not working.
I am running an android project from eclypse and I am able to see its process ID. But when I type
kill 14421 it says operation not permitted.
Is there a way to kill a process from adb shell?
I googled a lot but found nothing.

推荐答案

试试这个:

Try this :
adb shell kill <PID>


adb shell kill <pid>



将为您完成工作。

如果您没有进程名称和只知道包裹的名称,你可能想试试


will do the job for you.
If you don't have tha process name and only know the name of the package, you might want to try

adb shell am force-stop <packagename>





想要讨论不允许进程终止的问题:这个问题在这个美丽的SO线程 [ ^ ]


这篇关于从ADB SHELL杀死一个进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆