LinuxCommandLibrary

bundletool-dump

Inspect details of an Android App Bundle

TLDR

Display the AndroidManifest.xml of the base module

$ bundletool dump manifest --bundle [path/to/bundle.aab]
copy

Display a specific value from the AndroidManifest.xml using XPath
$ bundletool dump manifest --bundle [path/to/bundle.aab] --xpath [/manifest/@android:versionCode]
copy

Display the AndroidManifest.xml of a specific module
$ bundletool dump manifest --bundle [path/to/bundle.aab] --module [name]
copy

Display all the resources in the application bundle
$ bundletool dump resources --bundle [path/to/bundle.aab]
copy

Display the configuration for a specific resource
$ bundletool dump resources --bundle [path/to/bundle.aab] --resource [type/name]
copy

Display the configuration and values for a specific resource using the ID
$ bundletool dump resources --bundle [path/to/bundle.aab] --resource [0x7f0e013a] --values
copy

Display the contents of the bundle configuration file
$ bundletool dump config --bundle [path/to/bundle.aab]
copy

SYNOPSIS

bundletool dump <SUBCOMMAND> [--bundle=PATH | --apks=PATH | --apk=PATH] [--output=PATH] [signing options]

PARAMETERS

SUBCOMMAND
    Dump type: manifest (AndroidManifest.xml), resources (resources.arsc proto), asset-slices (dynamic asset modules), split-compat-dex (DEX for split compat)

--bundle=PATH, -b PATH
    Path to .aab bundle (default input)

--apks=PATH
    Path to .apks archive; mutually exclusive with --bundle/--apk

--apk=PATH
    Path to single .apk; mutually exclusive with others

--output=PATH, -o PATH
    Output file/path (stdout if omitted)

--keystore=PATH, -k PATH
    Keystore for signing dynamic features

--ks-pass=pass:PASSWORD
    Keystore password

--key-alias=ALIAS
    Key alias in keystore

--key-pass=pass:PASSWORD
    Key password

DESCRIPTION

The bundletool dump command extracts and displays detailed information from Android App Bundles (.aab), APK Set Archives (.apks), or standalone APKs (.apk). It supports multiple output types including the merged AndroidManifest.xml, compiled resources in readable format, asset slices for dynamic features, and split-compat DEX files.

This tool is essential for developers to inspect bundle structure without installation, debug resource configurations, verify manifest attributes, and analyze splits for optimization. Output is formatted as XML for manifests, Protocol Buffers for resources, or directories for assets/DEX.

Bundletool operates via a Java JAR, requiring JDK 8+. It integrates into build pipelines for validation. Usage involves specifying the input bundle/APK and dump type, with options for keystore signing if dynamic modules are present.

CAVEATS

Requires JDK 8+; large bundles slow to process; signing needed for dynamic features; output formats developer-specific (not human-readable for all)

EXAMPLES

bundletool dump manifest --bundle=app.aab
bundletool dump resources --bundle=app.aab --output=resources.txt
bundletool dump asset-slices --apks=app.apks --ks=keystore.jks --ks-pass=pass:foo

INSTALLATION

Download bundletool-all-*.jar from GitHub; run as java -jar bundletool.jar dump ...; included in Android SDK Build-Tools 30+

HISTORY

Developed by Google; introduced in 2018 with Android App Bundle launch (bundletool v0.2.0); evolved for App Bundle verification, now at v1.15+ with enhanced dump support.

SEE ALSO

aapt2(1), unzip(1), jar(1)

Copied to clipboard