download_universal_apk_from_google_play

Download the Universal APK of a given version code from the Google Play Console

Download the universal APK of a given version code from the Google Play Console.

This uses fastlane supply (and the AndroidPublisher Google API) to download the Universal APK
generated by Google after you uploaded an .aab bundle to the Play Console.

See https://developers.google.com/android-publisher/api-ref/rest/v3/generatedapks/list

download_universal_apk_from_google_play
Supported platforms android
Author @Automattic
Returns The path to the downloaded Universal APK. The action will raise an exception if it failed to find or download the APK in Google Play

Parameters

Key Description Default
package_name The package name of the application to use *
version_code The versionCode for which to download the generated APK *
json_key The path to a file containing service account JSON, used to authenticate with Google *
json_key_data The raw service account JSON data used to authenticate with Google *
root_url Root URL for the Google Play API. The provided URL will be used for API calls in place of https://www.googleapis.com/
timeout Timeout for read, open, and send (in seconds) 300
destination The path on disk where to download the Generated Universal APK
certificate_sha256_hash The SHA256 hash of the signing key for which to download the Universal, Code-Signed APK for. Use 'xx:xx:xx:…' format (32 hex bytes separated by colons), as printed by keytool -list -keystore <keystorefile>. Only useful to provide if you have multiple signing keys configured on GPC, to specify which generated APK to download

* = default value is dependent on the user's system


Documentation

To show the documentation in your terminal, run

fastlane action download_universal_apk_from_google_play

CLI

It is recommended to add the above action into your Fastfile, however sometimes you might want to run one-offs. To do so, you can run the following command from your terminal

fastlane run download_universal_apk_from_google_play

To pass parameters, make use of the : symbol, for example

fastlane run download_universal_apk_from_google_play parameter1:"value1" parameter2:"value2"

It's important to note that the CLI supports primitive types like integers, floats, booleans, and strings. Arrays can be passed as a comma delimited string (e.g. param:"1,2,3"). Hashes are not currently supported.

It is recommended to add all fastlane actions you use to your Fastfile.


Source code

This action, just like the rest of fastlane, is fully open source, view the source code on GitHub


Back to actions