Python library for the Android binary XML (AXML) file format.
Project description
AXML
AXML/ARSC: The Rosetta Stone for Android's Binary XML
Android doesn't speak in plain text XML. To save space and speed up parsing, it uses a compressed, obfuscated binary format (AXML) for its manifests and a complex table (ARSC) for its resources. axml is your translator.
This is a standalone, dependency-free, native Python library built to decode the secrets of Android's binary XML and resource files. It is a battle-hardened pillar of the new Androguard Ecosystem, providing the critical ability to turn machine-optimized formats back into human-readable intelligence.
This is a library for handling the AXML file format. AXML is the informal
common name for the compiled binary XML data format used in Android app files.
The Android Open Source Project does not seem to have named the format, other
than referring to is as binary XML or compiled XML.So AXML stands for
Android XML. The file format is based on compiling XML source into a binary
format based on protobuf. There are a number of different Android XML file
types that are compiled to AXML, these are generically known as Android
Resources.
All of these files are included in the APK's ZIP package with the file extension
.xml even though they are actually AXML and not XML.
Some specific data files, like String Resources and Style Resources, are instead
compiled into a single file resources.arsc in its own data format, known as
ASRC. AXML files often refer to values that are in resources.arsc.
The entry point for an app is the "app
manifest"
defines the essential data points that every app must have, like Package Name
and Version Code, and includes lots of other metadata that describe the
app. Every Android app file (APK) must include
AndroidManifest.xml,
which in the APK is the compiled binary AXML format, not XML, despite the file
extension. The source code files for the binary app manifest file are also
called AndroidManifest.xml, but they are actually XML. There can be
multiple source files,
but there is only ever one single compiled binary AndroidManifest.xml that is
valid in the APK.
https://developer.android.com/guide/topics/manifest/manifest-intro#reference
Current status
- Passing androguard tests for axml and arsc.
Coding style
- Follow PEP 257 guidelines using the reStructuredText (reST) format for all docstrings.
Installation
Examples
TODO
- Write tests early approach, so we can immediately verify breaking changes.
- Expose a clean public API
- Standalone capabilities for axml parsing
- Provide basic documentation
- pyproject.toml/setup.py
- workflows for testing/building
Authors
AXML binary format
Some references about the binary AXML format:
- aapt2 compiles XML to protobuf-based AXML
- aapt2 source code
- aapt source code
- The binary format for
AndroidManifest.xmlis defined inApkInfo.proto.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axml-0.0.1.tar.gz.
File metadata
- Download URL: axml-0.0.1.tar.gz
- Upload date:
- Size: 102.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bbfc134e6e570093b8da9f968851ac69109e81d968e68bae6927c5c313fcdc4
|
|
| MD5 |
81421f460220e2ef20d47b3096c81085
|
|
| BLAKE2b-256 |
cd356b8381b9a588a1e14bbf4286c4a37cb9b4211ee98679520192e57be4413d
|
File details
Details for the file axml-0.0.1-py3-none-any.whl.
File metadata
- Download URL: axml-0.0.1-py3-none-any.whl
- Upload date:
- Size: 100.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ba573a92508f3e78c25bdd8718c906cc19fcdb5a6cd1c450deaf3d351c4e373
|
|
| MD5 |
3d7f6acd79eb2203709bf907fb41d088
|
|
| BLAKE2b-256 |
3e070788c348e15300773c8f4c99c20cc80b65bf9cd8b9a62e9cc87f73fe466a
|