原文地址:http://www.krvarma.com/posts/android/security-permissions-in-android/
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_PROPERTIESandroid.permission.ACCESS_SURFACE_FLINGERandroid.permission.ACCOUNT_MANAGER android.permission.BIND_APPWIDGETandroid.permission.BIND_DEVICE_ADMINandroid.permission.BIND_INPUT_METHODandroid.permission.BIND_WALLPAPERandroid.permission.BRICKandroid.permission.BROADCAST_PACKAGE_REMOVEDandroid.permission.BROADCAST_SMSandroid.permission.BROADCAST_WAP_PUSHandroid.permission.CALL_PRIVILEGEDandroid.permission.CHANGE_COMPONENT_ENABLED_STATEandroid.permission.CLEAR_APP_USER_DATAandroid.permission.CONTROL_LOCATION_UPDATESandroid.permission.DELETE_CACHE_FILESandroid.permission.DELETE_PACKAGESandroid.permission.DEVICE_POWERandroid.permission.DIAGNOSTICandroid.permission.FACTORY_TESTandroid.permission.FORCE_BACKandroid.permission.GLOBAL_SEARCHandroid.permission.HARDWARE_TESTandroid.permission.INJECT_EVENTSandroid.permission.INSTALL_LOCATION_PROVIDERandroid.permission.INSTALL_PACKAGESandroid.permission.INTERNAL_SYSTEM_WINDOWandroid.permission.MANAGE_APP_TOKENSandroid.permission.MASTER_CLEARandroid.permission.READ_FRAME_BUFFERandroid.permission.READ_INPUT_STATEandroid.permission.REBOOTandroid.permission.SET_ACTIVITY_WATCHERandroid.permission.SET_ORIENTATIONandroid.permission.SET_PREFERRED_APPLICATIONSandroid.permission.SET_TIMEandroid.permission.STATUS_BARandroid.permission.UPDATE_DEVICE_STATSandroid.permission.WRITE_GSERVICESandroid.permission.WRITE_SECURE_SETTINGSTo 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.