APK vs AAB vs XAPK vs split APKs: what is inside Android packages
The five Android package formats explained: APK, AAB, XAPK, split APKs and bare DEX/.so, how each is structured, how to inspect it, and what it means for a security audit.
Updated: 2026-11-13·6 min read
“Send me the APK” used to be simple. Today the same app can reach you as an APK, an AAB from Play’s publishing pipeline, an XAPK from a third-party store, a set of split APKs pulled from a device, or, in forensic work, a bare classes.dex and a lone .so recovered from somewhere. The formats are related but not interchangeable, and the differences matter when you audit.
APK: the unit of installation
APK (Android Package) is a signed ZIP: AndroidManifest.xml in binary form, compiled resources, one or more classes*.dexfiles with Dalvik bytecode, lib/<abi>/*.so native libraries, assets/ and META-INF/ with the signature. Everything an auditor needs (manifest, code, native layer, embedded secrets) is inside this one file, which is why “an APK audit” is the canonical unit of Android static analysis.
AAB: the publishing format
AAB (Android App Bundle) is what developers upload to Play. It is also a ZIP, but its payload is organized for Google’s tooling: base/ with manifest and code, splits/ with per-density, per-ABI and per-language modules, plus BundleConfig.pb. Users never install an AAB: Play compiles it into optimized APK sets (or delivers it as .apkm-style installers on newer distribution paths).
For an auditor the AAB is good news: it contains all splits and resources in one place, with nothing stripped by device-specific optimization. Tooling like bundletool build-apks can materialize the exact APKs a device would receive.
Split APKs and .apks
When you pull an app off a device (or export via bundletool) you often get several APKs: base.apk plus split_config.arm64_v8a.apk,split_config.xxhdpi.apk, split_config.en.apk. The.apks container is a ZIP of exactly those files. Installs go through adb install-multiple or session-based installers.
Audit note: native libraries live in the ABI split, the manifest in base. Analyzing base alone silently skips the entire native layer, a common mistake when someone emails you “the APK” and it is only the base module.
XAPK: the third-party bundle
XAPK is a third-party-store convention (popularized by APKPure): a ZIP containing base.apk, the splits, sometimes OBB expansion files and a manifest.json describing the payload. It is not an Android standard: Android never installs an XAPK directly; companion installers unpack it first.
For audits, XAPK is a convenience: one file, complete app, but from an unofficial channel, and that is itself a finding. Attribution matters: the signature inside base.apk either matches the original developer or you are looking at a repack (see the malware guide’s certificate step).
Bare DEX and .so: the forensic leftovers
Sometimes you get a classes.dex without a manifest or a single.so dropped by an incident response team. Both still audit meaningfully: DEX decompiles to the same Java sources (you lose manifest-level findings such as permissions and exported components), and a native library still gives imports, exported symbols, strings, section entropy and a full disassembly pass, including secrets baked into the binary.
Format cheat sheet
APK: installable unit; manifest + DEX + .so + resources in one signed ZIP.
AAB: publishing format for Play; all splits included; needs bundletool to run.
.apks: bundle of generated APKs (base + splits); from bundletool or device export.
XAPK: third-party-store bundle of base + splits + OBB; unofficial channel.
.dex: bytecode only; code-level audit without manifest context.
.so: native library only; imports/strings/disassembly, Ghidra territory.
A scanning pipeline that accepts all of them natively (instead of demanding “an APK please”) removes the step where findings are lost to a format conversion. Our engine reads all five; the demos page shows the same analysis applied to each format, including split attribution (which file a finding came from inside an XAPK). Whichever one you have on disk can be checked the same way, with one report format and no conversion step in between.
Frequently asked
Is an AAB more secure than an APK?
No. AAB is a publishing format: Google generates optimized APKs from it. The code, keys and permissions are the same. An auditor should unpack whatever artifact is at hand, and an AAB bundles everything an APK does, so it scans just as well.
Why do third-party stores ship XAPK instead of APK?
Because Play stopped serving monolithic APKs. An XAPK is a ZIP bundle holding a base APK plus split APKs (per-ABI native code, per-DPI resources, languages). Third-party stores re-bundle what Play delivers as multiple files, so large apps with native libraries travel as XAPK.
I only have a .dex or a .so file. Is an audit still possible?
Yes, partially. A bare DEX decompiles to the same Java an APK contains, minus the manifest context. A bare .so still yields imports, strings, entropy and a disassembly pass. You lose manifest-level findings (permissions, components) but keep code-level ones, including secrets.