{"id":21736,"library":"pyaxmlparser","title":"pyaxmlparser","description":"Python3 parser for Android binary XML files (e.g., AndroidManifest.xml). Provides easy extraction of application name, package, permissions, and other manifest attributes without relying on Androguard. Active development on GitHub by Appknox.","status":"active","version":"0.3.31","language":"python","source_language":"en","source_url":"https://github.com/appknox/pyaxmlparser","tags":["android","xml","manifest","binary-xml","apk-parser"],"install":[{"cmd":"pip install pyaxmlparser","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Main class for parsing Android binary XML files.","symbol":"AXMLParser","correct":"from pyaxmlparser import AXMLParser"},{"note":"High-level APK representation, parses manifest, resources, and dex.","symbol":"APK","correct":"from pyaxmlparser import APK"}],"quickstart":{"code":"from pyaxmlparser import APK\n\napk = APK('sample.apk')\nprint(apk.package)\nprint(apk.application)\nprint(apk.permissions)","lang":"python","description":"Open an APK file and extract basic info: package name, application label, and permissions."},"warnings":[{"fix":"Ensure the APK file is not corrupted and is a valid ZIP archive.","message":"APK file path must be valid; the library does not provide detailed error messages for malformed APKs.","severity":"gotcha","affected_versions":"all"},{"fix":"Use separate instances or protect with threading.Lock.","message":"pyaxmlparser is not thread-safe; do not share AXMLParser instances across threads without locks.","severity":"gotcha","affected_versions":"all"},{"fix":"Wrap parsing in a try/except block or use an alternative like androguard for complex files.","message":"The library may raise 'SystemError: unknown type' on certain edge-case XML nodes. This is not a user error but a parser limitation.","severity":"gotcha","affected_versions":">=0.3.0"},{"fix":"Always check for None before accessing nested attributes.","message":"APK object properties (e.g., .application) may return None if the manifest is missing expected tags.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run: pip install pyaxmlparser","cause":"Library not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'pyaxmlparser'"},{"fix":"Provide the absolute or correct relative path to the APK file.","cause":"Incorrect path or missing file; pyaxmlparser does not download or validate the APK automatically.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'sample.apk'"},{"fix":"Check if apk.application is not None before accessing methods on it.","cause":"APK object's 'application' property is None because the manifest lacks an <application> tag.","error":"AttributeError: 'NoneType' object has no attribute 'get'"},{"fix":"Ensure the file is a genuine APK (ZIP format).","cause":"The provided file is not a valid APK/Zip archive.","error":"zipfile.BadZipFile: File is not a zip file"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}