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
- Passing androguard tests for axml and arsc.
- Follow PEP 257 guidelines using the reStructuredText (reST) format for all docstrings.
- 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
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.xml
is defined inApkInfo.proto
.