2021-03-13 00:04:37 +00:00
|
|
|
|
# bundletool
|
|
|
|
|
|
2024-02-14 20:25:13 +00:00
|
|
|
|
> Manipulate Android Application Bundles.
|
2021-09-13 09:21:21 +01:00
|
|
|
|
> Some subcommands such as `bundletool validate` have their own usage documentation.
|
2024-02-16 15:37:37 +00:00
|
|
|
|
> More information: <https://developer.android.com/tools/bundletool>.
|
2021-03-13 00:04:37 +00:00
|
|
|
|
|
|
|
|
|
- Display help for a subcommand:
|
|
|
|
|
|
|
|
|
|
`bundletool help {{subcommand}}`
|
|
|
|
|
|
|
|
|
|
- Generate APKs from an application bundle (prompts for keystore password):
|
|
|
|
|
|
2024-04-18 19:38:25 +01:00
|
|
|
|
`bundletool build-apks --bundle {{path/to/bundle.aab}} --ks {{path/to/key.keystore}} --ks-key-alias {{key_alias}} --output {{path/to/file.apks}}`
|
2021-03-13 00:04:37 +00:00
|
|
|
|
|
|
|
|
|
- Generate APKs from an application bundle giving the keystore password:
|
|
|
|
|
|
2024-04-18 19:38:25 +01:00
|
|
|
|
`bundletool build-apks --bundle {{path/to/bundle.aab}} --ks {{path/to/key.keystore}} --ks-key-alias {{key_alias}} –ks-pass {{pass:the_password}} --output {{path/to/file.apks}}`
|
2021-03-13 00:04:37 +00:00
|
|
|
|
|
|
|
|
|
- Generate APKs including only one single APK for universal usage:
|
|
|
|
|
|
2024-04-18 19:38:25 +01:00
|
|
|
|
`bundletool build-apks --bundle {{path/to/bundle.aab}} --mode {{universal}} --ks {{path/to/key.keystore}} --ks-key-alias {{key_alias}} --output {{path/to/file.apks}}`
|
2021-03-13 00:04:37 +00:00
|
|
|
|
|
|
|
|
|
- Install the right combination of APKs to an emulator or device:
|
|
|
|
|
|
2024-04-18 19:38:25 +01:00
|
|
|
|
`bundletool install-apks --apks {{path/to/file.apks}}`
|
2021-03-13 00:04:37 +00:00
|
|
|
|
|
|
|
|
|
- Estimate the download size of an application:
|
|
|
|
|
|
2024-04-18 19:38:25 +01:00
|
|
|
|
`bundletool get-size total --apks {{path/to/file.apks}}`
|
2021-03-13 00:04:37 +00:00
|
|
|
|
|
|
|
|
|
- Generate a device specification JSON file for an emulator or device:
|
|
|
|
|
|
2024-04-18 19:38:25 +01:00
|
|
|
|
`bundletool get-device-spec --output {{path/to/file.json}}`
|
2021-03-13 00:04:37 +00:00
|
|
|
|
|
|
|
|
|
- Verify a bundle and display detailed information about it:
|
|
|
|
|
|
2024-04-18 19:38:25 +01:00
|
|
|
|
`bundletool validate --bundle {{path/to/bundle.aab}}`
|