Generate Apk file from aab file (android app bundle)

Jayanth picture Jayanth · Oct 29, 2018 · Viewed 73.4k times · Source

Is there any way to generate an apk file from android app Bundle via terminal or using android studio?

Answer

Aaron Small picture Aaron Small · Jul 22, 2019

So far nobody has provided the solution to get the APK from an AAB.

This solution will generate a universal binary as an apk.

  1. Add --mode=universal to your bundletool command (if you need a signed app, use the --ks parameters as required).

    bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks
        --mode=universal
    
  2. MAIN STEP: Change the output file name from .apks to .zip

  3. Unzip and explore

  4. The file universal.apk is your app

This universal binary will likely be quite big but is a great solution for sending to the QA department or distributing the App anywhere other than the Google Play store.