bundletool
Manipulate Android App Bundles and APKs
TLDR
Build APK set from app bundle
$ bundletool build-apks --bundle=[app.aab] --output=[app.apks]
Build APKs with signing$ bundletool build-apks --bundle=[app.aab] --output=[app.apks] --ks=[keystore.jks] --ks-key-alias=[alias]
Install APKs to connected device$ bundletool install-apks --apks=[app.apks]
Extract APKs for specific device$ bundletool extract-apks --apks=[app.apks] --output-dir=[output] --device-spec=[device.json]
Get device specification$ bundletool get-device-spec --output=[device.json]
Validate app bundle$ bundletool validate --bundle=[app.aab]
Print bundle info$ bundletool dump manifest --bundle=[app.aab]
Get APK size estimates$ bundletool get-size total --apks=[app.apks]
SYNOPSIS
bundletool command [options]
DESCRIPTION
bundletool is the command-line tool for manipulating Android App Bundles. It builds app bundles, generates APK sets for various device configurations, and installs APKs to connected devices.The tool is used by Android Studio, the Android Gradle plugin, and Google Play to build and process Android App Bundles.
PARAMETERS
--bundle file
Path to Android App Bundle (.aab)--output file
Output file path--apks file
Path to APK set archive--device-spec file
Device specification JSON file--ks file
Path to keystore for signing--ks-pass pass
Keystore password (pass:password or file:/path)--ks-key-alias alias
Key alias in keystore--key-pass pass
Key password (pass:password or file:/path)--connected-device
Build APKs for the connected device--local-testing
Add metadata for local feature module testing--overwrite
Overwrite existing output file
COMMANDS
build-bundle
Build Android App Bundle from module zip filesbuild-apks
Generate APK set from app bundleextract-apks
Extract APKs for specific device configurationinstall-apks
Install APKs to connected deviceget-device-spec
Write device specification to JSON filevalidate
Verify app bundle validitydump
Print bundle information in human-readable formget-size
Compute download size estimatesversion
Print bundletool version
CAVEATS
Requires Java Runtime Environment. Device installation requires ADB and a connected Android device. Signed APKs require keystore credentials. App bundles must be valid according to Android App Bundle specification.
