Registry / devops / apkinspector

apkinspector

JSON →
library1.3.7pypypi✓ verified 24d ago

apkInspector is a Python library and CLI tool designed to provide detailed insights into the ZIP structure of APK files. It offers the capability to extract content and decode the AndroidManifest.xml file, notably without relying on external libraries for ZIP parsing. Currently at version 1.3.6, it maintains an active development cycle with frequent bug fix releases.

pip install apkinspector
INSTALL
IMPORT
SIG · APKINSPECTOR
A
apkinspector
devopspythonv1.3.7
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.3.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

apkInspector
import apkInspector
from apkinspector.headers import ZipEntry
apkInspectorCLI
import apkInspectorCLI
from apkinspector.headers import ZipEntry

This quickstart demonstrates how to initialize the library with an APK file, list its contents, and attempt to decode the `AndroidManifest.xml`. Note that for a minimal dummy APK, the manifest decoding will fail as no actual manifest is present.

import os from apkinspector.headers import ZipEntry from apkinspector.axml import Axml # Assuming an APK file named 'example.apk' exists in the current directory # For demonstration, create a dummy file if not present if not os.path.exists('example.apk'): with open('example.apk', 'wb') as f: f.write(b'PK\x05\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') # Empty ZIP EOCD # Read the APK file content with open('example.apk', 'rb') as f: apk_content = f.read() # List contents of the APK print("Listing APK entries:") try: entries = ZipEntry.parse(apk_content) if entries: for entry in entries: print(f" - {entry.filename}") else: print(" No entries found (this might be an empty or malformed APK).") except Exception as e: print(f"Error parsing APK entries: {e}") # Attempt to decode AndroidManifest.xml (requires a valid manifest in the APK) # This will likely fail for a dummy APK without a real manifest print("\nAttempting to decode AndroidManifest.xml:") try: # For a real APK, 'AndroidManifest.xml' would be present # For this dummy example, it will likely raise an error manifest = Axml(apk_content, "AndroidManifest.xml") decoded_manifest = manifest.get_xml() print(decoded_manifest) except FileNotFoundError: print("AndroidManifest.xml not found in the APK (as expected for a dummy APK).") except Exception as e: print(f"Error decoding AndroidManifest.xml: {e}")
apkinspector --version
Debug
Known issues
gotchaWhen parsing highly obfuscated or malformed APK files, the library might still encounter issues despite continuous improvements. The tool aims to process such files, but edge cases can lead to parsing errors or incomplete results.
fix
Ensure you are using the latest version of `apkinspector` for the most robust parsing capabilities. Report specific issues with sample APKs to the GitHub repository.
affects: All versions, especially older ones (pre-1.3.6 had specific fixes for obfuscation and malformation).
gotchaAPK files containing non-UTF8 characters in filenames might have been problematic in older versions, leading to parsing errors or incorrect file listings. While v1.3.0 introduced fixes, extremely rare character encodings could still cause unexpected behavior.
fix
Always use the latest `apkinspector` version. If issues persist with specific filenames, consider pre-processing the APK (if safe and legal) or reporting the issue.
affects: <1.3.0 had known issues; improved in 1.3.0.
gotchaapkInspector is an actively developed project, meaning that while core functionalities are stable, new features or refactorings might introduce subtle changes in behavior or API additions between minor versions. Users should review release notes for updates.
fix
Regularly check the GitHub releases page for new versions and their changelogs, especially before updating in production environments.
affects: All versions, due to active development.
Upgrade
Version history
1.3.7latest on PyPI · released Aug 28, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
34
OpenAI (training)
1
Resources
apkinspector — pip install apkinspector · libregistry