ParseManifest class

class glorifiedgrep.android.ParseManifest(manifest_path)

This class can be used to just parse an AnroidManifest.xml file and parse it. This class does not decompile an APK file

__init__(manifest_path)

The __init__ method for the ParseManifest class

Parameters:manifest_path (str) – Path to the manifest file
>>> a = ParseManifest('/path/to/AndroidManifest.xml')
>>> a.activities
all_manifest_analysis() → dict

Property runs all available checks in _ManifestAnalysis

Returns:Dictionary of all analysis
Return type:dict
manifest_activities() → list

Returns a list of all activities and all related attributes | Reference | Reference

Returns:An array of all the activities from the manifest
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_activities()
manifest_activity_alias() → list

Returns a list of all activity-alias and all related attributes | Reference

Returns:A list of aliased activies
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_activity_alias()
manifest_allow_backup() → bool

Returns true if the allow backup flag is set for the APK | Reference

Returns:Returns true if backup is allowed. Else False
Return type:bool

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_allow_backup()
manifest_android_version() → dict

Returns the version number matching for min and target sdk.

Returns:Android versions based on min and target sdk
Return type:dict

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_android_version()
manifest_application_node() → dict

Returns a dictionary of all values that are found in the application node | Reference

Returns:A dictionary of the application node from the manifest
Return type:dict

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_application_node()
manifest_bind_permissions() → list

Returns a list of permissions that have the BIND property. This allows this permission scope to be executed with the scope of the system

list
List of BIND permissions

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_bind_permissions()
manifest_custom_permission() → list

Parses the manifest for permissions and returns a dict of only custom permissions. | Referene

Returns:Custom permissions
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_custom_permission()
manifest_dangerous_permission() → list

Parses the manifest for permissions and returns a dict of only dangerous permissions | Reference Android SDK | Referene

Returns:Dangerous permissions
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_dangerous_permission()
manifest_debuggable() → bool

Returns true if the debuggable flag is set for the APK | Reference | Reference | Reference

Returns:Returns True if debuggable, else False
Return type:bool

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_debuggable()
manifest_exported_providers() → list

Returns a list of all providers and all related attributes | Reference | Reference OWASP

Returns:a list of exported provider nodes from the manifest
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_exported_providers()
manifest_intent_uri_filter() → list

Parses the manifest for permissions and returns a dict of only dangerous permissions | Referene

Returns:Intent filter uri’s
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_intent_uri_filter()
manifest_main_activity() → dict

Returns the main launchable activity as a dict

Returns:Main activity and its attributes
Return type:dict

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_main_activity()
manifest_meta_data() → list

Returns the contents inside meta-data nodes | Reference

Returns:a list of meta-data nodes
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_meta_data()
manifest_min_sdk() → int

Returns the minimum SDK from the APK | Reference

Returns:Min SDK
Return type:int

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_min_sdk()
manifest_package_name() → str

Returns the package name of the APK | Reference

Returns:Package name as a string
Return type:str

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_package_name()
manifest_permission(merged: bool = True) → list

Returns a list of application permission and their attributes | Reference

Parameters:merged (bool) – Merge the two permisison types into one list. Defaults to True
Returns:Permissions and their attributes
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_permission()
manifest_platform_build_version_code() → int

Returns the platform build version code from the APK

Returns:Platform version code
Return type:int

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_platform_build_version_code()
manifest_platform_build_version_name() → str

Returns the platform build version name from the APK

Returns:Platform version name
Return type:str

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_platform_build_version_name()
manifest_providers() → list

Returns a list of all providers and all related attributes | Reference | Reference

Returns:a list of registered providers in the manifest
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_providers()
manifest_receivers() → list

Returns a list of all receivers and all related attributes | Reference

Returns:a list receivers registered in the manifest
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_receivers()
manifest_secrets() → list

Find all secrets hidden in AndroidManifest.xml like tokens, keys etc.

Returns:a list of common secrets hardcoded in the manifest.
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAnroid('/path/to/apk')
>>> a.manifest_secrets()
manifest_services() → list

Returns a list of all services and all related attributes | Reference

Returns:a list of registered services in the manifest
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_services()
manifest_signature_permission() → list

Parses the manifest for permissions and returns a dict of only signature permissions | Reference Android SDK | Referene

Returns:Signature permissions
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_signature_permission()
manifest_target_sdk() → int

Returns the target SDK from the APK | Reference

Returns:Target SDK number
Return type:int

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_target_sdk()
manifest_uses_configuration() → list

Returns the uses-configuration and all attributes from the APK | Reference

Returns:uses configuration. Returns None if none found
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.uses_configuration()
manifest_uses_feature() → list

Returns a list of all uses-feature node. uses-feature is normally used to elaborate on permissions. | Reference

Returns:Attributes of found uses-feature nodes
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_uses_feature()
manifest_uses_library() → list

Returns the uses-library and all attributes from the APK | Reference

Returns:uses library
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_uses_library()
manifest_uses_permission(merged: bool = True) → list

Returns a list of application permission and their attributes. This is the main way stating permissions in AndroidManifest.xml file | Reference

Parameters:merged (bool, optional) – Merge the two permisison types into one list defaults to True
Returns:Permissions and their attributes
Return type:list

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_uses_permissions()
manifest_version_code() → int

Returns the version code from the APK | Reference

Returns:Version code. None if not found
Return type:int

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_version_code()
manifest_version_name() → str

Returns the version name from the APK | Reference

Returns:Version name from the manifest. None if not found
Return type:str

Examples

>>> from glorifiedgrep import GlorifiedAndroid
>>> a = GlorifiedAndroid('/path/to/apk)
>>> a.manifest_version_name()