Skip to content
Stand-alone binary AndroidManifest.xml decoder
C++ CMake
Branch: master
Clone or download
Latest commit 8e26ee9 May 9, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Remove unnecessary node from May 10, 2017
external Add minizip submodule May 7, 2017
include/jitana/util Support direct loading from an APK file May 7, 2017
lib/jitana/util Support direct loading from an APK file May 7, 2017
.gitignore Initial commit Apr 25, 2017
CMakeLists.txt Initial commit Apr 25, 2017 Fix spelling May 10, 2017
axmldec_config.hpp Add axmldec_config.hpp May 10, 2017
main.cpp Add axmldec_config.hpp May 10, 2017

axmldec: Android Binary XML Decoder

1 Overview

AndroidManifest.xml in an APK file is binary encoded. This tool accepts either a binary or a text XML file and prints the decoded XML to the standard output or a file. It also allows you to extract the decoded AndroidManifest.xml directly from an APK file.

Tools such as Apktool are designed to process the whole APK file including the resource files for reverse engineering purpose. They may also need a Java virtual machine to run. As a result, they are too slow for batch processing many APK files just to get the XML information. In contrast, axmldec is specialized for binary XML decoding and written in simple modern C++, so it runs nicely within a shell script.

The parser is taken from Jitana, a graph-based static-dynamic hybrid DEX code analysis tool. You can use jitana::read_axml() instead of the standard boost::property_tree::read_xml() to read a binary XML file into boost::property_tree::ptree (Boost Property Tree) in your C++ program.

2 Installation

2.1 macOS

You can install axmldec using Homebrew:

brew tap ytsutano/toolbox
brew install axmldec

Or, download the binary from Releases.

2.2 Windows

Download the .exe file from Releases.

2.3 Linux

Build the tool from the source code (see below).

3 Usage

3.1 Decoding AndroidManifest.xml

Pass the manifest file (either binary or text) to decode:

axmldec -o output.xml AndroidManifest.xml

This will write the decoded XML to output.xml. You can specify the same filename for input and output to decode the file in-place.

3.2 Decoding AndroidManifest.xml in an APK File

If an APK file is specified, axmldec automatically extracts and decodes AndroidManifest.xml:

axmldec -o output.xml

3.3 Using the Standard Output

axmldec writes to the standard output if the -o option is not specified. This is useful when additional processing is required. For example, you can extract the package name from an APK file using xmllint:

axmldec | xmllint --xpath 'string(/manifest/@package)' -

4 Building

  1. Install Boost, zlib, and CMake. Make sure you have a latest C++ compiler.

  2. Clone axmldec and its submodule from GitHub:

    git clone --recursive
  3. Compile axmldec:

    cmake -DCMAKE_BUILD_TYPE=Release . && make

5 Developer

6 License

  • See for license rights and limitations (ISC).
You can’t perform that action at this time.