Question

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 I have included this permission

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

at the manifest.

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

thanks.

Was it helpful?

Solution

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.

EDIT: 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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top