Giter Club home page Giter Club logo

axmldec's Introduction

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 com.example.app.apk

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 com.example.app.apk | 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 https://github.com/ytsutano/axmldec.git
  3. Compile axmldec:

    cmake -DCMAKE_BUILD_TYPE=Release . && make

5 Developer

6 License

  • See LICENSE.md for license rights and limitations (ISC).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.