2 unstable releases
new 0.2.0 | Feb 17, 2025 |
---|---|
0.1.0 | Aug 22, 2024 |
#2935 in Parser implementations
59 downloads per month
8.5MB
2.5K
SLoC
Contains (APK file, 8MB) lumen.apk, (APK file, 1MB) tests/assets/app-release.apk, (APK file, 3KB) tests/assets/app.apk
rusty-axml
Rust parser for Android binary XML files
About
Every APK contains many XML files like its manifest, strings, layouts... All of these files are stored in the Android binary XML format. This crate provides the necessary logic to decode these files into human-readable XML.
Current status
As of version 0.2.0 only the parsing of Android manifest files is supported. The work to support any and all AXML files is ongoing.
Usage
We provide both a library and a binary crate.
Library
Add to your Cargo.toml
:
rusty-axml = "0.2.0"
The easiest way to get started is to use the parse_from_apk()
or
parse_from_axml()
functions. As the names indicate you can pass an APK or an
AXML file to get an Axml
object in return.
See the documentation on docs.rs for details on how to use this library.
Binary crate
The binary crate is not compiled by default. To compile it, run
cargo build --release --features=cli
Then use either cargo run
or the newly built axmlparser
binary to convert
AXML files. Here are the possible CLI arguments (also available using -h
or
--help
):
-a, --apk <APK>
: path to an APK-x, --xml <XML>
: path to an Android binary XML file-o, --output <OUTPUT>
: path to the output file to write the decoded content
If --output
is not specified, axmlparser
will print the decoded XML to the
standard output.
Dependencies
~3.5–5MB
~81K SLoC