1

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.

Hamad
  • 5,096
  • 13
  • 37
  • 65
joseRo
  • 1,337
  • 3
  • 18
  • 35
  • Seems like they have plugged a big Security hole in KitKat. – Nitin Sethi Nov 25 '13 at 15:47
  • It's always been a system level permission. Just lots of people running into problems with their system apps misbehaving because Google changed where system apps have to reside to properly be granted permissions. – MattC Nov 26 '13 at 18:37

1 Answers1

3

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.

Community
  • 1
  • 1
MattC
  • 12,285
  • 10
  • 54
  • 78
  • it's a system app.... I didnt used the android:protectionLevel but it worked so far...to add it? do you think its what causing the problem with api 19, because all other api's are fine with it – joseRo Nov 25 '13 at 16:00