I an new to Android Development. I was looking at the android manifest permissions. There are two things. Permissions and Permission Groups. I know that the list at
http://developer.android.com/reference/android/Manifest.permission.html
is not comprehensive and you can add your own permission as well.But, I want to ask that is this possible to map each permission into the permission groups mentioned at
http://developer.android.com/reference/android/Manifest.permission_group.html.
The Android source contains the actual mappings between the default permission groups and permissions.
https://github.com/android/platform_frameworks_base/blob/master/core/res/AndroidManifest.xml
If you wanted a mapping from permission group to permission you could take AndroidMainifest.xml file for the version of Android you are working with and parse the XML to create the mapping. So to answer your question yes it is possible, but it sounds like this may be overkill for your task.
UPDATE: Because I actually needed this mapping myself for another project I decided to share my code to create this mapping. You can view the results in the github repository.
Link: https://github.com/benjholla/AndroidPermissionAttributeMapper
UPDATE 2:
My group open sourced our solution that generates this mapping and some other object wrappers around Android documentation for permissions. There are some tutorials on the project page and the github repo.
Project Page: https://ensoftcorp.github.io/android-essentials-toolbox/
Source: https://github.com/EnSoftCorp/android-essentials-toolbox
As far as I Know: Manifest.permission_group*AB* = Manifest.permission*A* + Manifest.permission*B* take a look at this instance:
android.permission-group.MESSAGES
=SEND_SMS + WRITE_SMS + RECEIVE_SMS + READ_SMS + BROADCAST_SMS
I hope you get the idea.
It's possible to use PackageManager getAllPermissionGroups() and queryPermissionsByGroup() to enumerate the entire Android permission hierarchy. The code below produced the output shown at the end on a 5.1.1 (SDK 22) device. The groups marked "personal" have groupInfo.flags == 1, and appear to correspond to the permission groups that are called "dangerous" in Marshmallow.
You will get different permission hierarchies on different devices due to differences in SDK levels and the fact that apps can define custom permissions.
There is a table in the API Guides, but only for dangerous permissions:
https://developer.android.com/guide/topics/security/permissions.html#perm-groups