As we all know whenever we use a particular feature or API we need to request the permission in AndroidManifest.xml file with uses-permission element. If we don’t specify any permissions, then the application will not have any permission and application can do anything that does not require a permission. This link explains the permissions in android in more detail and this link lists the permissions in Android.
Permissions are granted to the application by package installer while installing. But not all the permissions will be granted to the system. There are some system permission which will not be granted to the user applications, but only to the system applications. Following are some of the permissions that may NOT be granted to the user application.
android.permission.ACCESS_CHECKIN_PROPERTIES android.permission.ACCESS_SURFACE_FLINGER android.permission.ACCOUNT_MANAGER android.permission.BIND_APPWIDGET android.permission.BIND_DEVICE_ADMIN android.permission.BIND_INPUT_METHOD android.permission.BIND_WALLPAPER android.permission.BRICK android.permission.BROADCAST_PACKAGE_REMOVED android.permission.BROADCAST_SMS android.permission.BROADCAST_WAP_PUSH android.permission.CALL_PRIVILEGED android.permission.CHANGE_COMPONENT_ENABLED_STATE android.permission.CLEAR_APP_USER_DATA android.permission.CONTROL_LOCATION_UPDATES android.permission.DELETE_CACHE_FILES android.permission.DELETE_PACKAGES android.permission.DEVICE_POWER android.permission.DIAGNOSTIC android.permission.FACTORY_TEST android.permission.FORCE_BACK android.permission.GLOBAL_SEARCH android.permission.HARDWARE_TEST android.permission.INJECT_EVENTS android.permission.INSTALL_LOCATION_PROVIDER android.permission.INSTALL_PACKAGES android.permission.INTERNAL_SYSTEM_WINDOW android.permission.MANAGE_APP_TOKENS android.permission.MASTER_CLEAR android.permission.READ_FRAME_BUFFER android.permission.READ_INPUT_STATE android.permission.REBOOT android.permission.SET_ACTIVITY_WATCHER android.permission.SET_ORIENTATION android.permission.SET_PREFERRED_APPLICATIONS android.permission.SET_TIME android.permission.STATUS_BAR android.permission.UPDATE_DEVICE_STATS android.permission.WRITE_GSERVICES android.permission.WRITE_SECURE_SETTINGS
To get these permissions, the application must be signed with the key which used to sign the platform. This may be different for manufacturers. So it practically not possible to get these permissions granted to a user application.
Note: While playing with PowerManager.reboot I was so stupid I thought my application will be granted the permission android.permission.REBOOT, but it was not granted. Then I created an application requesting all the permissions and above list of permissions are not granted. Hope this will help you when you request a permission next time.
{ 2 comments… read them below or add one }
Great info about the permissions. Where does one find the code key in the source code used to build the platform? And I guess with that data I would sign my app the usual way?
Thanks for the great posting and this information is very helpful to me.
I think that those permissions are mostly defined in Android framework by signature protectionLevel, but not sure signatureOrSystem protectionLevel yet.
> Then I created an application requesting all the permissions and above list of permissions are not granted.
Actually I also tried this, but I don’t know the following things.
How to get the comprehensive permission lists and request them in Android app ?
Is it enough just to add in AndroidManifest.xml ?
Or should the actual requesting call be there ?
Or did you try PackageManager.checkPermission(String permName, String pkgName); ?
- http://developer.android.com/reference/android/Manifest.permission.html
I’m so sorry for the poor questions. I’m newbie to Android and have a personal interesting on Android permission stuff.
Thanks a lot.