my application gives the user the option to grant root access to allow access to some system function (NFC). By default it never asks for root.
So, after permissions is granted, I figured it should work, but I am still getting the dreaded:
08-10 22:06:49.320: W/System.err(9421): Caused by: java.lang.SecurityException: WRITE_SECURE_SETTINGS permission required: Neither user 10174 nor current process has android.permission.WRITE_SECURE_SETTINGS.
error. Am I missing something?
I am asking for the WRITE_SECURE_SETTINGS
permission, so that can't be it.
The funny thing is I had NFC enable/ disable working, but after I installed a new Rom, I keep getting this error. It updated from 4.0.3 to 4.0.4, but no changes to the code in question as far as I can tell...any ideas?
Am I missing something?
You are missing the WRITE_SECURE_SETTINGS
permission.
I am asking for the WRITE_SECURE_SETTINGS permission, so that can't be it.
AFAIK, being root has nothing to do with permissions, directly. To hold WRITE_SECURE_SETTINGS
, your app must either be signed by the same signing certificate that signed the firmware or be installed on the system partition. Being root is neither of those things.