如何授予系统权限到我的Andr​​oid应用? [英] How to grant system permissions to my android app?

查看:80
本文介绍了如何授予系统权限到我的Andr​​oid应用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我采取默默演示卸载从设备的应用程序。

I'm implementing a demo on silently uninstall an app from device.

在亚行的shell,我可以用点卸载软件包名做任务,但是当我写了code,我得到了一些权限被拒绝的错误。

In adb shell, I can use pm uninstall packagename to do the task, but when I wrote code, I got some permission denied error.

我一直在谷歌上搜索了一阵,发现得到DELETE_PACKAGES允许,我一定要签我的应用程序相同的证书作为系统一样。

I've been googling for a while, and found that to get DELETE_PACKAGES permission, I have to sign my app with the same certificate as the system does.

所以,任何人都可以给我如何做到这一点的一些技巧?或者,反正是有,我可以做,使我的应用程序运行的系统服务?

So, can anyone give me some tips on how to do this? Or, is there anyway I can do to make my app running as system service?

推荐答案

远不如静默卸载以某种方式砌体的应用程序。有几个方法,这可以做,但基本上保持跟踪他们用它的第一天,使程序无法正常工作。可替代地,它可以被设置,直到某一天,在这之后将不再工作的工作。 这个问题的答案如何做到这一点。

Far better than a silent uninstall is somehow bricking the app. There's a few ways that this could be done, but basically keep track of the first day they used it, and make the program not work. Alternatively, it could be set up to work until a certain day, after which it will no longer work. This question answers how to do this.

这篇关于如何授予系统权限到我的Andr​​oid应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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