Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,576 Members 38,522 Now Online
XDA Developers Android and Mobile Development Forum

[Q] SystemOrSignature permission denied

Tip us?
Member - OP
Thanks Meter 12
Posts: 46
Join Date: Aug 2012
Question [Q] SystemOrSignature permission denied

I am trying to build a very small broadcast receiver only application, that will be in /system/app so it will have access for the permissions i need, and i can broadcast a few intents from my main application (not in /system) to perform a few activities.
I had never programmed using system permissions, so it took me a while to understand why even copying the apk in /system i was still getting permission denied; So i found out that i have to manually run "pm grant PACKAGE PERMISSION" to the manually copied apk and it worked. At least for WRITE_SECURE_SETTINGS permission. The problem is i am trying now to use the android.permission.CHANGE_COMPONENT_ENABLED_STATE, which should also be System|Signature , but i can not make it work.

If i try pm grant PACKAGE android.permission.CHANGE_COMPONENT_ENABLED_STATE, i get:

Operation not allowed: java.lang.SecurityException: Permission android.permission.CHANGE_COMPONENT_ENABLED_STATE is not a changeable permission type

And the error when i try to disable a component from another app is:

W/System.err( 4631): java.lang.SecurityException: Permission Denial: attempt to change component state from pid=4631, uid=10069, package uid=10038
W/System.err( 4631): at android.os.Parcel.readException(
W/System.err( 4631): at android.os.Parcel.readException(
W/System.err( 4631): at$Stub$Proxy.setC omponentEnabledSetting(
W/System.err( 4631): at EnabledSetting( )
W/System.err( 4631): at
W/System.err( 4631): at$1700(ActivityThr
W/System.err( 4631): at$H.handleMessage(Activit
W/System.err( 4631): at android.os.Handler.dispatchMessage( 2)
W/System.err( 4631): at android.os.Looper.loop(
W/System.err( 4631): at a:5081)
W/System.err( 4631): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 4631): at java.lang.reflect.Method.invoke(
W/System.err( 4631): at$MethodAndArgsCa
W/System.err( 4631): at .java:607)
W/System.err( 4631): at dalvik.system.NativeStart.main(Native Method)

Any ideas how can i get this permission ?
My apk is already in /system/app

Thanks !
Senior Member
Thanks Meter 92
Posts: 477
Join Date: Jan 2011
Location: Barrow-in-Furness

If you're using Android 4.4 it should be in /system/priv-app
Current Device: Google LG Nexus 5 (ROW Edition).
Old Phone: LG GT540 Optimus

Don't hit for any particular reason. Thanks should be special...

If you have issues with my apps, email or PM me - I'll try my best to support you!

App support email:
permission system|signature
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes