本文介绍了奇巧API 19安全例外,虽然使用INSTALL_PACKAGES的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我调用使用反射的方法,一切直到19 API伟大的工作,API 19扔我此异常:

I'm invoking a method using reflection, everything worked great until API 19, API 19 throwing me this exception:

java.lang.SecurityException: Neither user 10080 nor current process has android.permission.INSTALL_PACKAGES

ofcource我已经包括此权限

ofcource I have included this permission

<uses-permission android:name="android.permission.INSTALL_PACKAGES"/>

在清单。

我试图找到一些对开发商,但没有帮助有用,

I tried to find something useful on the developers but no help,

感谢。

推荐答案

INSTALL_PACKAGES 许可被标记为系统/签名作为你的。这意味着,除非你是一个系统的应用程序或已经使用相同的证书持​​有的许可,在这种情况下是系统应用程序签名。与OEM使用签名的Andr​​oid分布的关键签字是不是一件很容易在我所知道的任何情况下获得的。

The INSTALL_PACKAGES permission is marked as system/signature as you can see here. This means unless you are a system app or have been signed with the same certificate as the app that holds the permission, which in this case is the system. Being signed with the key the OEM uses to sign the distribution of Android is not something that is easily obtained in any case I know of.

编辑:有的运行到哪里他们的系统正常应用程式不再工作在4.4的情况下,因为把你的应用程序中的 /系统/应用程序不再自动助学金制度的人的实例-level权限。你必须把你的应用程序中的 /系统/私法应用为被授予适当的权限。

There are multiple instances of people running into instances where their system apps no longer function properly in 4.4, because putting your app in /system/app no longer automatically grants system-level permissions. You have to place your app in/system/priv-app for the proper permissions to be granted.

这篇关于奇巧API 19安全例外,虽然使用INSTALL_PACKAGES的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 15:27