Format:Android App Bundle
| Platforms | Platform:Android |
|---|---|
| Magic | 50 4B 03 04 (ZIP) |
| Extensions | .aab |
| On this wiki | Facts · Code · Notes · Topics |
Android App Bundle (.aab): the publishing format uploaded to Google Play, a ZIP of modules (base/ plus feature modules) with a BundleConfig.pb, protobuf manifests and resource tables (resources.pb instead of resources.arsc). It is never installed directly; bundletool turns it into split APKs.
Layout
An .aab is a Format:ZIP. Top level (names from bundletool source, BundleModule.java and AppBundle.java):
BundleConfig.pb: protobufandroid.bundle.BundleConfig(bundletool version, optimizations, compression globs, bundle type REGULAR/APEX/ASSET_ONLY).BUNDLE-METADATA/: extra metadata files (for example ProGuard/R8 mapping, code transparency), grouped by namespace directory.- One directory per module; the main one is named
base. Each module holds:manifest/AndroidManifest.xml: the manifest as protobuf (XmlNode), not Format:AXML.dex/classes.dex,classes2.dex...: Format:DEX files, same format as in an APK.res/**: resource files; XML ones are protobuf XmlNode too.resources.pb: protobufResourceTable, the replacement of Format:Resources.arsc.assets/**,lib/<abi>/*.so,root/**(files copied to the APK root, for exampleroot/apex_manifest.pbin APEX bundles).assets.pb(targeting of asset directories),native.pb(targeting of lib directories),apex.pb(APEX images),runtime_enabled_sdk_config.pb.
Reversing consequences
- A bundle cannot be installed or decompiled by tools expecting an APK: the manifest and resources are protobuf. bundletool
build-apks --mode=universalmakes one APK from it; the code index/andlib/is unchanged. - Directory names carry targeting:
assets/texture#tcf_astc/,lib/per ABI.assets.pb/native.pbmap them to device dimensions. - Feature modules (dynamic features) are separate directories with their own dex; they appear later as split APKs (
split_<module>.apk) or on demand.
Related
See Platform:Android/App packaging for how a bundle becomes splits, .apks sets, XAPK/APKM archives, OBB files and asset packs. Proto schemas: src/main/proto/config.proto, files.proto, targeting.proto in bundletool.
Unverified
Unverified: the protobuf XmlNode and ResourceTable messages come from AAPT2's Resources.proto / Configuration.proto, which bundletool vendors via the aapt2 protos; their field numbers were not read here.
Code & repositories
- https://github.com/google/bundletool @
586a43a450712a1067f3d92cf7574dee68226302· license: Apache-2.0
Official AAB tool; protobuf schemas for BundleConfig, targeting and the .apks toc.pb
Tested on: source read, not run: source read, not run · checked 2026-10-18; last activity 2025-12-15; Note: the latest release ships binaries; the wiki links only the source, never the binaries