Hey devs! π
We all know Google Play now prefers Android App Bundles (AAB) for publishing because they generate optimized APKs for each device.
But in real-world development, we often need a single APK for:
- Testing on physical devices
- Sharing with QA teams
- Quick installs without Play Store
Here is the easiest and official way to convert your .aab file into an .apk using Googleβs Bundletool.
π οΈ Step 1: Download Bundletool
Go to the official GitHub releases:
π https://github.com/google/bundletool/releases/latestDownload the latest file:
bundletool-all-x.x.x.jar
- Place the
.jarfile:
- In the same folder as your
.aabfile OR - Remember its full path
βοΈ Step 2: Generate .apks File (Universal Mode)
Open Command Prompt (Windows) or Terminal (Mac/Linux) and run:
java -jar bundletool-all-1.18.3.jar build-apks --bundle=app-release.aab --output=myapp.apks --mode=universal
π Replace:
-
bundletool-all-1.18.3.jarβ your actual jar filename -
app-release.aabβ your AAB file path/name
π¦ Output:
myapp.apks
By default, this is signed with a debug keystore.
π¦ Step 3: Extract the APK
- Rename the file:
ren myapp.apks myapp.zip
- Extract it using:
- WinRAR
- 7-Zip
- Default OS extractor
- Inside, youβll find:
universal.apk
π Thatβs your final APK!
You can rename it:
app-release.apk
π Generate Signed APK (Recommended for QA)
If you want a release-signed APK, use your keystore:
java -jar bundletool-all-1.18.3.jar build-apks \
--bundle=app-release.aab \
--output=myapp.apks \
--mode=universal \
--ks=your-keystore.jks \
--ks-key-alias=your_alias \
--ks-pass=pass:your_keystore_password \
--key-pass=pass:your_key_password
π§ Common Tips & Troubleshooting
- β Check Java installation:
java -version
π Keep files in the same folder to avoid path issues
π¦ Universal APK is larger (contains all device configs)
π« Not for Play Store β upload AAB only
-
β Error:
Unable to access jarfile- Check filename and path carefully
π Conclusion
Thatβs it! π―
In less than 2 minutes, you can convert any .aab into an .apk using Bundletool β no GUI tools needed.
If you run into any issues, drop the error in the comments β happy to help! π
Top comments (0)