Since Google made the Android App Bundle (.aab) the default publishing format on Google Play, publishing workflows have drastically shifted away from traditional monolithic APK files. While AABs streamline dynamic delivery—serving modular splits tailored for exact CPU architectures (ABI), display densities, and languages—they introduce a major challenge for developers, QA engineers, and reverse engineering researchers: Android devices cannot directly install an .aab file.
To test production builds on test hardware, perform static binary inspection, or modify resources, engineers must convert the App Bundle into a universal, standalone APK. In this comprehensive guide, we walk through the architecture of AABs, the command-line mechanics of Google's bundletool, troubleshooting split configuration issues, and how to inspect and sign the resulting binaries effortlessly using APKTool Studio.
Understanding the AAB Architecture vs. Standalone APKs
Unlike a traditional APK which contains compiled DEX bytecode, pre-compiled assets, and uncompressed native shared libraries (.so) wrapped directly into a single signed zip container, an Android App Bundle is an intermediate packaging format. An AAB contains:
- Base and Feature Modules: Code and resources split into subfolders such as
base/,feature1/, etc. - Protocol Buffers (Protobuf) Manifests: The
AndroidManifest.xmlinside an AAB is compiled into binary protocol buffer format rather than standard Android Binary XML (AXML). - Resource Tables: Resources organized to facilitate on-demand dynamic splitting by Google Play's serving engine.
Because Android's Package Manager (pm) on real hardware expects either a monolithic APK or standard split APKs signed with matching keys, deploying an AAB requires building an intermediate container known as an APK Set (.apks) archive or generating a consolidated Universal APK.
Method 1: Extracting a Universal APK Using Bundletool
The standard reference tool provided by Google for handling Android App Bundles is bundletool. It allows you to generate a single standalone APK containing all ABI architectures, densities, and localized strings.
Step 1: Download Bundletool and Prepare Signing Keys
Download the latest official bundletool.jar release from Google's GitHub repository. Because every installed APK requires a valid signature on Android, prepare your signing Keystore.
Step 2: Generate the Universal APK Set
Execute the build-apks command with the --mode=universal flag. This tells the generator to merge split modules and assets into a single monolithic package rather than generating device-specific splits.
java -jar bundletool-all.jar build-apks \
--bundle=app-release.aab \
--output=app-universal.apks \
--mode=universal \
--ks=my-release-key.jks \
--ks-pass=pass:KeystorePassword123 \
--ks-key-alias=my-key-alias \
--key-pass=pass:KeyPassword123If you are testing in a non-production reverse-engineering sandbox and lack the original release keystore, you can omit the keystore parameters to generate unsigned archives or let bundletool apply its default debug keystore.
Step 3: Extract the Universal APK from the APKS Archive
The output file app-universal.apks is simply a ZIP archive. You can rename the extension or extract it directly using standard archiving utilities:
unzip app-universal.apks -d output_apk_folder
ls -lh output_apk_folder/universal.apkThe extracted universal.apk can now be installed on any physical Android device or emulator via ADB:
adb install output_apk_folder/universal.apkMethod 2: Extracting Device-Specific Splits for Target Hardware
In scenarios where a universal APK is unnecessarily large due to containing all armeabi-v7a, arm64-v8a, and x86_64 native binaries, you can extract only the split APKs matched to your connected test device.
Step 1: Build the Connected Device Specification
Connect your Android phone with USB debugging enabled, then extract the hardware specifications:
java -jar bundletool-all.jar get-device-spec --output=device-spec.jsonStep 2: Generate and Install Targeted Split APKs
# Generate the device-targeted APKS container
java -jar bundletool-all.jar build-apks \
--bundle=app-release.aab \
--output=device-splits.apks \
--device-spec=device-spec.json \
--ks=my-release-key.jks \
--ks-pass=pass:KeystorePassword123 \
--ks-key-alias=my-key-alias
# Install all generated splits directly to the connected device
java -jar bundletool-all.jar install-apks --apks=device-splits.apksInspecting, Decompiling, and Modifying the Converted APK
Once you have extracted universal.apk from the AAB, you can perform full static analysis, unpack Smali bytecode, and audit the application manifest. Traditional offline toolchains require maintaining Java runtimes, Apktool CLI installations, zipalign utilities, and apksigner configurations.
You can streamline this workflow by using APKTool Studio. As an integrated online browser-based suite, APKTool Studio allows you to upload the universal APK to immediately:
- Decompile Smali Bytecode: Inspect internal logic, security verifications, and API integrations without setting up local decompilation environments.
- Edit the Decoded AndroidManifest.xml: Configure debuggable flags (
android:debuggable='true'), inspect exported activities, or adjust network security policies. - Resign the Package: Realign with
zipalignand apply custom Keystores with modern APK Signature Scheme (v2, v3, and v4) verification directly in your browser.
Resolving Common AAB-to-APK Conversion Pitfalls
1. Protocol Buffer vs. Binary XML Mismatches
When unpacking an AAB directly with standard ZIP tools, developers frequently discover that AndroidManifest.xml cannot be parsed by conventional XML viewers or basic decompilers. This occurs because AAB resources are compiled into Protobuf rather than the standard Android Binary XML (AXML) format. Always use bundletool to convert the bundle first, or decompile the generated universal.apk with APKTool Studio to produce human-readable XML.
2. Missing Native Libraries (ABI Incompatibility)
When compiling universal APKs, ensure your build configurations include native libraries for all target architectures. If your AAB was compiled with enableSplit = true on dynamic features, double-check that third-party native C/C++ dependencies in base/lib/ contain appropriate symbol files for 64-bit architectures (arm64-v8a) as required by modern 64-bit-only Android releases.
3. Signature Scheme Verification Failures
Android 11+ and modern Android releases enforce strict APK Signature Scheme v2+ requirements. If an extracted universal APK fails during installation with errors like INSTALL_PARSE_FAILED_NO_CERTIFICATES, sign the package using apksigner or the online Keystore signer in APKTool Studio to verify v2/v3 signing integrity and alignment.
Conclusion
While the Android App Bundle format optimizes Play Store distribution, converting AABs to Universal APKs remains an essential skill for QA testing, continuous integration artifact verification, and security auditing. By leveraging bundletool alongside browser-based decompilation and signing tools like APKTool Studio, developers can bridge the gap between bundle distribution and deep APK-level reverse engineering.