Exporting a universal APK from an AAB
With Bitrise's Export Universal APK Step you can export a universal APK from the App Bundle, sign it with a keystore (or debug keystore), and deploy the APK to your test device before releasing the app to the Google Play Store.
You can test an Android app on a test device even if the generated artifact is an App Bundle (.aab
). With the Export Universal APK Step you can export a universal APK from the App Bundle, sign it with a keystore (or debug keystore), and deploy the APK to your test device before releasing the app to the
Google Play Store.
Configuring this Step is super simple:
Workflow Editor
bitrise.yml
-
Insert the Export Universal APK Step after the Android Build Step in your Workflow.
-
Make sure the Android App Bundle path input's value is the output variable (
BITRISE_AAB_PATH
) of the previous build Step.Using a different build Step
If you don't use the Android Build Step to build an AAB file, make sure that the input points to the AAB output of the Step you used. You can use an Environment Variable, or a direct local path or URL.
-
Make sure the Keystore URL input points to your Android keystore file.
We recommend uploading the file to Bitrise and using the default Env Var:
$BITRISEIO_ANDROID_KEYSTORE_URL
. You can, however, use a local path or a URL as input value here. -
Provide your credentials in the Keystore alias and the Keystore password inputs.
If you uploaded a keystore file to Bitrise, the default value of the inputs should not need to be changed.
-
In the Bundletool version input, you can override the default Bundletool version if you need a specific one but make sure you use the correct version.
-
Run your Workflow.
-
In your app's
bitrise.yml
file, insert thebitrise-step-export-universal-apk
Step after theandroid-build
Step.my-workflow: steps: - android-build: {} - bitrise-step-export-universal-apk: inputs:
-
Make sure the
aab_path
input's value is the output variable ($BITRISE_AAB_PATH
) of the previous build Step.Using a different build Step
If you don't use the
android-build
Step to build an AAB file, make sure that the input points to the AAB output of the Step you used. You can use an Environment Variable, or a direct local path or URL.my-workflow: steps: - android-build: {} - bitrise-step-export-universal-apk: inputs: - aab_path: "$BITRISE_AAB_PATH"
-
Make sure the
keystore_url
input points to your Android keystore file.We recommend uploading the file to Bitrise and using the default Env Var:
$BITRISEIO_ANDROID_KEYSTORE_URL
. You can, however, use a local path or a URL as input value here.my-workflow: steps: - android-build: {} - bitrise-step-export-universal-apk: inputs: - aab_path: "$BITRISE_AAB_PATH" - keystore_url: "$BITRISEIO_ANDROID_KEYSTORE_URL"
-
Provide your credentials in the
keystore_alias
and thekeystore_password
inputs.If you uploaded a keystore file to Bitrise, the default value of the inputs should not need to be changed. Otherwise store your credentials in a Secret and use the Secrets as the input values.
my-workflow: steps: - android-build: {} - bitrise-step-export-universal-apk: inputs: - aab_path: "$BITRISE_AAB_PATH" - keystore_url: "$BITRISEIO_ANDROID_KEYSTORE_URL" - keystore_password: "$BITRISEIO_ANDROID_KEYSTORE_PASSWORD" - keystore_alias: "$BITRISEIO_ANDROID_KEYSTORE_ALIAS"
-
In the
bundletool_version
input, you can override the default Bundletool version if you need a specific one but make sure you use the correct version.my-workflow: steps: - android-build: {} - bitrise-step-export-universal-apk: inputs: - aab_path: "$BITRISE_AAB_PATH" - keystore_url: "$BITRISEIO_ANDROID_KEYSTORE_URL" - keystore_password: "$BITRISEIO_ANDROID_KEYSTORE_PASSWORD" - keystore_alias: "$BITRISEIO_ANDROID_KEYSTORE_ALIAS" - bundletool_version: 1.8.1
-
Run your Workflow.
The Export Universal APK Step exports the APK to the $BITRISE_APK_PATH
Environment Variable which the next Steps can pick up. If the Deploy to Bitrise.io Step is included in your Workflow, the Ship add-on can deploy
the APK for you.