APK vs. AAB: security implications explained
Understand the move from legacy APKs to Android App Bundles (AABs), how dynamic delivery works and the new security challenges it creates.
How Android app delivery changed
Android apps used to ship as a single APK built for every device, which made downloads large. Google Play now asks for the Android App Bundle (AAB), a publishing format from which Play builds smaller APKs for each device.
For the first decade of Android, the APK (Android Package Kit) was the standard. Developers compiled their code, resources and assets into a single .apk file, signed it and uploaded it to the Google Play Store for users to download.
As mobile applications grew more complex, with high-resolution assets, many language localizations and several CPU architectures, these monolithic APKs ballooned in size. Users downloaded gigabytes of data full of assets their device would never use.
To fix this, Google introduced the AAB (Android App Bundle), now the mandatory publishing format for all new apps on the Google Play Store. AABs cut app sizes sharply and improve the user experience, but they also change the trust model, the distribution mechanics and the security requirements for mobile developers.
How the Android App Bundle (AAB) works
An AAB is not installed directly: it holds the code and resources for every device configuration, and Google Play generates and signs device-specific APKs from it. An APK is the file a device installs; an AAB is the file you upload to the store.
The core difference between an APK and an AAB is purpose. An APK is an installable artifact. An AAB is a publishing format.
You cannot install an AAB directly on an Android device. The workflow goes like this:
The developer builds an AAB containing all compiled code and resources for all possible device configurations.
The developer uploads the AAB to the Google Play Console.
When a user taps "Install", Google Play's Dynamic Delivery infrastructure looks at that user's device (screen density, CPU architecture, language).
Google Play generates a set of optimized, device-specific APKs (called Split APKs) built for that user.
Google Play signs these Split APKs and sends them to the device for installation.
The security implications of the AAB shift
With App Bundles, Google Play builds and signs the final APKs, so the signing key and part of the trust chain move to the store. Protection also has to work on the bundle itself and hold up when Play splits it into per-device files.
Dynamic Delivery is very efficient, but it opens new attack surfaces and supply-chain vulnerabilities that security teams have to deal with.
1. The shift in cryptographic trust (Play App Signing)
In the legacy APK model, the developer held the private signing key, signed the APK locally and uploaded it. Trust stayed entirely with the developer.
Because Google Play has to generate and sign the final Split APKs on the fly, Google must hold your application's real signing key. This is called Google Play App Signing.
The vulnerability: you now sign your AAB with an "Upload Key" before sending it to Google. If an attacker compromises your CI/CD pipeline or a developer's laptop and steals that Upload Key, they can upload a malicious, tampered AAB to your Play Console. Google will accept it without question, sign the malicious split APKs with your production key and ship malware to your entire user base.
The solution: organizations need strict Signing Key Custody vaults that protect their Upload Keys and never expose them to build environments as plaintext.
2. Protecting dynamic feature modules
AABs let developers split their app into a "Base Module" and "Dynamic Feature Modules" that download on demand (for example, a large 3D AR filter feature that only downloads when the user opens the camera).
The vulnerability: attackers often go after dynamic modules because they tend to hold premium features, proprietary logic or sensitive data meant for specific user tiers. If a security tool obfuscates only the Base Module and ignores the AAB's more complex packaging, the dynamic modules ship with no protection at all.
The solution: an enterprise protection platform has to understand the AAB format natively. It must parse the bundle and apply deep code obfuscation and RASP injections across the Base Module and every Dynamic Feature Module at once, without breaking Google Play's dynamic delivery engine.
3. The threat of Split APK reassembly
When an unprotected AAB is uploaded to Google Play, the resulting Split APKs are downloaded to the user's device.
The vulnerability: an attacker can download an app from the Play Store, pull the Split APKs off a rooted device and use tools to stitch them back into one large, monolithic APK. From there, they can reverse-engineer the unprotected logic, patch out billing checks and distribute the repackaged APK on third-party pirate app stores.
The solution: when you apply deep structural obfuscation and anti-tampering integrity checks to the AAB before upload, even an attacker who reassembles the Split APKs faces code that is costly to reverse-engineer, and the app refuses to run if modified.
Securing the modern app delivery pipeline
Teams that ship AABs need protection that accepts the bundle itself and fits into the release pipeline. nultr protects both APK and AAB files after the build, and can run from CI/CD with its CLI, a GitHub Action or the REST API.
Moving to AABs means organizations have to upgrade their security tooling. Legacy obfuscators built only for monolithic APKs cannot properly protect dynamic delivery workflows or handle the complexity of split module hardening.
The nultr platform is built for modern Android architectures. It plugs straight into your CI/CD pipeline and provides App Bundle Protection, so every module, asset and library in your AAB is hardened, obfuscated and securely signed before it reaches the Google Play Console.
Related
Android signing key custody
Protect Android application signing keys with controlled, auditable signing workflows. Reduce supply-chain risks with nultr's enterprise signing key custody.
ReadWhat is code obfuscation?
Learn what code obfuscation is, how techniques like control-flow flattening and string encryption work, and why standard minification isn't enough for security.
ReadAPK repackaging detection and protection
Learn how APK repackaging works at a high level, why it threatens Android app integrity, and how application protection can reduce the risk of app cloning.
ReadWhat is anti-tampering in mobile apps?
Learn what anti-tampering is, why attackers repackage Android applications and how cryptographic checks protect mobile app integrity.
Read