android-xml-converter-0.2.0 has been yanked.
Visit the last successful build:
android-xml-converter-0.2.2
android-xml-converter
This is just an experimental code to convert between android xml formats (abx and xml). functionality is not guaranteed.
android's default abx2xml and xml2abx
abx2xmlandxml2abxbinaries found generally in /system/bin/ of android devices is just a shell script that acts as a wrapper for executing abx.jar. It depends on Java and app_process, making it reliant on Android’s runtime environment. Since it invokes Java code, it cannot run independently in environments where Java isn’t available and also the overhead of launching a Java process adds extra execution time.
Standalone abx2xml and xml2abx
- This
abx2xmlandxml2abxbinary performs the same function—converting between ABX and XML but in a fully standalone manner. Unlike default android binaries ,this binary does not require Java, or abx.jar to function.
Command line usage
-
Similar to default abx2xml and xml2abx
-
abx2xml [-i] input [output] -
xml2abx [-i] [--collapse-whitespaces] input [output]
Building
Build Steps (C/C++ via Meson)
Rust Build (Cargo)
The Rust interface wraps the same logic using FFI bindings.
or
cargo install android-xml-converter
Documentation
It also provides some APIs to convert between ABX and XML.
- C/C++ API documentation: See the C API header or the C++ API header, or generate documentation by running:
- Rust API documentation:
Sources
BinaryXmlPullParser.java BinaryXmlSerializer.java