androguard.core.api_specific_resources package¶
Module contents¶
-
exception
androguard.core.api_specific_resources.
APILevelNotFoundError
¶ Bases:
Exception
-
androguard.core.api_specific_resources.
load_permission_mappings
(apilevel)¶ Load the API/Permission mapping for the requested API level. If the requetsed level was not found, None is returned.
- Parameters
apilevel – integer value of the API level, i.e. 24 for Android 7.0
- Returns
a dictionary of {MethodSignature: [List of Permissions]}
-
androguard.core.api_specific_resources.
load_permissions
(apilevel, permtype='permissions')¶ Load the Permissions for the given apilevel.
The permissions lists are generated using this tool: https://github.com/U039b/aosp_permissions_extraction
Has a fallback to select the maximum or minimal available API level. For example, if 28 is requested but only 26 is available, 26 is returned. If 5 is requested but 16 is available, 16 is returned.
If an API level is requested which is in between of two API levels we got, the lower level is returned. For example, if 5,6,7,10 is available and 8 is requested, 7 is returned instead.
- Parameters
apilevel – integer value of the API level
permtype – either load permissions (
'permissions'
) or
permission groups (
'groups'
) :return: a dictionary of {Permission Name: {Permission info}