Android上的其他应用程序的更改权限(扎根) [英] Change permissions of another application on Android (rooted)
问题描述
我看到这几个线程,但真的没有说话,我想做些什么。我试图写将拒绝其他应用程序连接到互联网(IE防火墙)的能力的应用程序。基于算法我创造它会确定该应用程序为是恶意的。该应用程序将是一个根深蒂固的手机上。那么我想为
I see a couple threads on this, but none really speak to what I would like to do. I am trying to write an application that will deny another application the ability to connect to the internet (IE Firewall). Based on algorithms I am creating it will determine that application as being malicious. The app would be on a rooted phone. I would then like to either
- 地带从应用程序的所有权限
- 否认特定的权限(互联网接入)
- 强制卸载该应用程序。
我知道有几个项目已经在那里,但我想code这个自己:]]
I know there are several programs already out there, but I would like to code this myself :]]
有了这样说任何人都可以点我在正确的方向?
With that being said could anyone point me in the right direction?
感谢您!
编辑:所以我发现这一点:
So I have found this:
public static void killRunningPackage(final Context context, String packageName)
{
ActivityManager activityManager = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE);
activityManager.killBackgroundProcesses(packageName);
}
什么说法做我通过在一个环境?我看了看网上的上下文,但我不很懂
What argument do I pass in for a context? I looked at contexts online but I didnt really understand them
推荐答案
构建透视
即使有一个根深蒂固的手机,因为这是由框架处理,我高度怀疑,就可以实现这样的事情。
Even with a rooted phone, because this is handled by the frameworks, I highly doubt that you can achieve something like this.
具体除非你有来源,可以编译一个新手机的来源,你不能做到这一点。
Specifically unless you have the source and can compile the source of a new phone, you cannot do this.
SDK透视
另外这个另一件事是你无法脱光,其权限的的应用,因为它在其中被嵌入到应用程序的.apk文件中的Manifest.xml,这是一个二进制并注册的软件包管理系统。
Also another thing about this is you can't "strip" an application of its permissions BECAUSE its in the Manifest.xml which gets embedded into the .apk of an application, which is a binary and is registered with the PackageManager.
这是远远超出了SDK的范围。
您有什么 CAN 做的是,如果它是不是你喜欢杀的应用程序。该软件包管理系统将是你最好的选择,但是,那就是只要你可以走了。
What you CAN do is kill an application if it isn't to your liking. The PackageManager would be your best option, however; that is as far as you can go.
更新
检查了这一点:
http://android.amberfog.com/?p=98
这篇关于Android上的其他应用程序的更改权限(扎根)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!