![Forrest logo](/images/logo.png)
bundletool
Bundletool is a command line tool developed by the Android team at Google. It is designed to help developers handle Android App Bundles, which are a publishing format that includes all the code and resources needed to build an Android app.
By using Bundletool, developers can perform various tasks related to app bundles. One of its main features is the ability to generate and manage APK (Android Application Package) sets from the bundles. These APK sets contain optimized APKs targeting specific device configurations, reducing app size and improving app performance.
Bundletool also enables developers to test and debug their app bundles on specific device configurations by generating device-specific APKs. This allows for more efficient testing and debugging without having to build and deploy the full app bundle.
In addition, Bundletool provides commands for extracting APKs from app bundles, installing APKs locally or on test devices, and verifying the integrity of an app bundle.
Overall, Bundletool simplifies the management and distribution of Android app bundles, making it a powerful tool for developers working on Android apps.
List of commands for bundletool:
-
bundletool-dump:tldr:142a5 bundletool-dump: Display the contents of the bundle configuration file.$ bundletool dump config --bundle=${path-to-bundle-aab}try on your machineexplain this command
-
bundletool-dump:tldr:4c652 bundletool-dump: Display all the resources in the application bundle.$ bundletool dump resources --bundle=${path-to-bundle-aab}try on your machineexplain this command
-
bundletool-dump:tldr:52296 bundletool-dump: Display the `AndroidManifest.xml` of a specific module.$ bundletool dump manifest --bundle=${path-to-bundle-aab} --module=${name}try on your machineexplain this command
-
bundletool-dump:tldr:64e15 bundletool-dump: Display a specific value from the `AndroidManifest.xml` using XPath.$ bundletool dump manifest --bundle=${path-to-bundle-aab} --xpath=${-manifest-@android:versionCode}try on your machineexplain this command
-
bundletool-dump:tldr:90fd3 bundletool-dump: Display the configuration and values for a specific resource using the ID.$ bundletool dump resources --bundle=${path-to-bundle-aab} --resource=${0x7f0e013a} --valuestry on your machineexplain this command
-
bundletool-dump:tldr:b434f bundletool-dump: Display the configuration for a specific resource.$ bundletool dump resources --bundle=${path-to-bundle-aab} --resource=${type-name}try on your machineexplain this command
-
bundletool-dump:tldr:f501b bundletool-dump: Display the `AndroidManifest.xml` of the base module.$ bundletool dump manifest --bundle=${path-to-bundle-aab}try on your machineexplain this command
-
bundletool-validate:tldr:a7029 bundletool-validate: Verify a bundle and display detailed information about it.$ bundletool validate --bundle=${path-to-bundle-aab}try on your machineexplain this command
-
bundletool:tldr:0c3a8 bundletool: Generate APKs from an application bundle giving the keystore password.$ bundletool build-apks --bundle=${path-to-bundle-aab} --ks=${path-to-key-keystore} --ks-key-alias=${key_alias} –ks-pass=${pass:the_password} --output=${filename-apks}try on your machineexplain this command
-
bundletool:tldr:194b0 bundletool: Generate a device specification JSON file for an emulator or device.$ bundletool get-device-spec --output=${filename-json}try on your machineexplain this command
-
bundletool:tldr:1ac55 bundletool: Estimate the download size of an application.$ bundletool get-size total --apks=${filename-apks}try on your machineexplain this command
-
bundletool:tldr:5d0a0 bundletool: Display help for a subcommand.$ bundletool help ${subcommand}try on your machineexplain this command
-
bundletool:tldr:a7af1 bundletool: Generate APKs from an application bundle (prompts for keystore password).$ bundletool build-apks --bundle=${path-to-bundle-aab} --ks=${path-to-key-keystore} --ks-key-alias=${key_alias} --output=${filename-apks}try on your machineexplain this command
-
bundletool:tldr:e9849 bundletool: Install the right combination of APKs to an emulator or device.$ bundletool install-apks --apks=${filename-apks}try on your machineexplain this command
-
bundletool:tldr:fed71 bundletool: Generate APKs including only one single APK for universal usage.$ bundletool build-apks --bundle=${path-to-bundle-aab} --mode=${universal} --ks=${path-to-key-keystore} --ks-key-alias=${key_alias} --output=${filename-apks}try on your machineexplain this command