Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate an APK (NOT APKS ) from AAB using bundletool?

I'm looking for a solution to generate an APK from Android App Bundle which will help me to share the App for internal testing rather publishing on Google Play Beta Testing.

Is there a way or a command using bundletool?

like image 906
Chathura Wijesinghe Avatar asked Jun 28 '19 10:06

Chathura Wijesinghe


2 Answers

I think that the best option is to use Internal App Sharing that allows to test easily your App Bundles and APKs, including debug builds:

With internal app sharing, you can quickly share an app bundle or APK with your internal team and testers by uploading an APK or app bundle on the internal app sharing upload page.

If you want to go the bundletool route, you need to generate an universal apk. Take a look at this answer on how to do it.

like image 105
pfmaggi Avatar answered Sep 28 '22 01:09

pfmaggi


pfmaggi mentioned Internal App Sharing, which is indeed the best way to test exactly what users will get.

An alternative, which isn't as accurate and doesn't always work in some edge cases, is building a universal APK by passing the flag --mode=universal to the build-apks command in bundletool. It still generates an .apks file, but you can then extract the single .apk file from it (using unzip or bundletool's extract-apks command).

like image 36
Pierre Avatar answered Sep 28 '22 01:09

Pierre