找回密码
 FreeOZ用户注册
查看: 1401|回复: 4
打印 上一主题 下一主题

[学习深造] KillProcess on android rooted device

[复制链接]
跳转到指定楼层
1#
发表于 26-10-2013 09:56:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册

x
Good morning,

How to kill my own process on android?

I already called following two methods and grant myself in supersu rights.

                    activityManager.KillBackgroundProcesses(runningAppProcessInfo.ProcessName);
                    Process.KillProcess(runningAppProcessInfo.Pid);

But it is uesless. The process still showing as running process.

TIA
回复  

使用道具 举报

2#
发表于 26-10-2013 10:41:47 | 只看该作者
你不是最近在弄iphone吗.又在弄android了?
回复  

使用道具 举报

3#
发表于 26-10-2013 10:53:51 | 只看该作者
回复  

使用道具 举报

4#
 楼主| 发表于 26-10-2013 12:06:48 | 只看该作者
levine 发表于 26-10-2013 10:41
你不是最近在弄iphone吗.又在弄android了?

开发android应用程序是主业,开发iphone应用程序是备份
回复  

使用道具 举报

5#
 楼主| 发表于 26-10-2013 12:26:25 | 只看该作者
本帖最后由 DDD888 于 26-10-2013 13:39 编辑

I found two solutions.

1
            var command = "pm disable " + context.PackageName + ";pm enable " + context.PackageName;
            ExecuteAsRoot(command);

2
            var command = "kill -9 " + processId;
            ExecuteAsRoot(command);
回复  

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+11, 29-11-2026 18:35 , Processed in 0.016202 second(s), 20 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表