This guide will show you how to convert an Android App Bundle (AAB) file into an APK using Bundletool. Follow these simple steps to generate a universal APK.
- Java: Ensure you have Java installed on your machine.
- Bundletool: Download the latest version of Bundletool.
Make sure that Java is installed. You can check this by running:
java -version
If Java is not installed, download and install it from here.
Download the latest version of Bundletool from the GitHub Releases page.
Run the following command to build the APK from the AAB file using Bundletool:
bundletool build-apks --bundle=/path/to/your_app.aab --output=/path/to/output.apks --mode=universal
If you need a signed APK, add your keystore information to the command:
bundletool build-apks --bundle=/path/to/your_app.aab --output=/path/to/output.apks --mode=universal --ks=/path/to/keystore.jks --ks-key-alias=my-key-alias --ks-pass=pass:my-password
The command above will generate a .apks
file. Rename this file to .zip
so you can extract it:
mv /path/to/output.apks /path/to/output.zip
Once renamed, unzip the file and look for the universal.apk
file. This is your APK.
unzip /path/to/output.zip -d /path/to/extracted-folder
The universal.apk
file will be in the extracted folder.
Now you have successfully converted your AAB file into a universal APK using Bundletool. You can now install this APK on your Android device or share it as needed.