Android app bundles arrived in 2018 as a new method for developers to publish their apps. Since then, Google promoted its use until a month ago, it established that the App Bundle would replace APKs on Google Play. The problem is that the App Bundle, in AAB format, cannot be installed on Android.
An App Bundle is like a ZIP file with everything you need to create the custom installable APK file for each device. It’s possible convert AAB App Bundle to APK file with the right tools, even if it’s a time-consuming process.
What you need to switch from AAB to APK
As developers start releasing all of their apps in the App Bundle format, it may be more common that you end up with AAB files instead of APK
It should be noted that App Bundles are not installable and, in fact, although the developers download an AAB file from Google Play, what is installed on your mobile is an APK. The problem and at the same time the advantage of this is that the APK that is downloaded and installed is much more optimized for the configuration of your mobile and, therefore, takes up less space. Anyway, if an app or game ends up in your hands in App Bundle format and you want to convert it to APK to install it, it is doable.
You will need it a computer, Java and a certificate to sign the applications. It sounds complicated, although you’ll get those last two components if you download and install Android Studio. Android Studio includes Java in its installation and will automatically create your debugging certificate, so this is a much more recommended option than doing it separately.
Also you will need the Bundletool tool, which you can download from GitHub. This is a JAR file, so you need to install Java on your PC before you can use the tool to convert AAB file to APK.
How to convert an App Bundle to APK
If you have an app or game in an App Bundle in AAB format and want to convert it to APK that you can install on your mobile, the easiest way is to upload the same folder on your PC the AAB and Bundletool file, to avoid having to include the routes.
Later, open this folder in command line. On Windows this involves pressing Win + R, typing cmd, and then going to the appropriate folder with a command like
CD C:MiCarpeta, Changing
MiCarpeta by the name of the folder. Then run the following command:
bundletool build-apks –bundle = aplicacion.aab –output = aplicacion.apks –mode = universal
Change in the previous command the name of application.aab to the name of your App Bundle file, while the application.apks you can choose any name, as long as it is a APKS file, not APK. In a moment, we’ll know why.
The process will take more or less depending on the complexity of the application and the speed of the PC, but generally it will not take more than a few seconds. Bundletool warns you that Android Studio debug certificate will be used, although if you want you can sign the app with any other key. You can see the Bundletool documentation on the Android developer website.
Once the process is complete, you will have an APKS file with the name you chose. It is not an APK, but a ZIP file which contains the APK file inside. Rename the APKS file to ZIP and open it with your favorite decompressor.
Unzip universal.apk and you will already have the APK file generated from the App Bundle. Keep in mind, of course, that it’s signed with a different debugging key than the developer’s key, so you won’t be able to update previous versions or install official versions over them.