<commit_before>`axmldec`: Android Binary XML Decoder
=====================================

## 1 Overview

`AndroidManifest.xml` in an APK file can be binary encoded. This tool simply
accepts either a binary or text XML file and prints the decoded XML to the
standard output.

    Android Binary XML ----+
                           |
                           +--->[axmldec]----> Decoded Text XML
                           |
              Text XML ----+

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, it is too slow for batch processing many
APK files just get the XML information. This tool ignores the resource files
and written in simple modern C++ that runs nicely within a shell script.

The parser is taken from [Jitana](https://github.com/ytsutano/jitana), a
graph-based static-dynamic hybrid DEX code analysis tool.

## 2 Usage

1. Use `unzip` to extract the manifest file from a APK file:

        unzip -j com.example.app.apk AndroidManifest.xml

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

        axmldec AndroidManifest.xml

    This will print the decoded XML file to the stdout.

## 3 Building

Install Boost and CMake. Then compile:

    cmake -DCMAKE_BUILD_TYPE=Release . && make

## 4 Developer

- <NAME> at University of Nebraska-Lincoln.

## 5 License

- See [LICENSE.md](LICENSE.md) for license rights and limitations (ISC).
<commit_msg>Mention xmllint --format in README.md<commit_after>`axmldec`: Android Binary XML Decoder
=====================================

## 1 Overview

`AndroidManifest.xml` in an APK file can be binary encoded. This tool simply
accepts either a binary or text XML file and prints the decoded XML to the
standard output.

    Android Binary XML ----+
                           |
                           +--->[axmldec]----> Decoded Text XML
                           |
              Text XML ----+

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, it is too slow for batch processing many
APK files just get the XML information. This tool ignores the resource files
and written in simple modern C++ that runs nicely within a shell script.

The parser is taken from [Jitana](https://github.com/ytsutano/jitana), a
graph-based static-dynamic hybrid DEX code analysis tool.

## 2 Usage

1. Use `unzip` to extract the manifest file from a APK file:

        unzip -j com.example.app.apk AndroidManifest.xml

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

        axmldec AndroidManifest.xml

    This will print the decoded XML file to the stdout.

    `axmldec` removes unnecessary whitespaces. Use another tool to make the
    output pretty if necessary:

        axmldec AndroidManifest.xml | xmllint --format - > pretty.xml

## 3 Building

Install Boost and CMake. Then compile:

    cmake -DCMAKE_BUILD_TYPE=Release . && make

## 4 Developer

- <NAME> at University of Nebraska-Lincoln.

## 5 License

- See [LICENSE.md](LICENSE.md) for license rights and limitations (ISC).

{'fraction_non_alphanumeric': 0.08996328029375765, 'fraction_numerical': 0.004283965728274173, 'mean_word_length': 2.81892523364486, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 18}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '156853', 'n_tokens_mistral': 916, 'n_tokens_neox': 857, 'n_words': 417}