APK File Internals
Also known as: apk structure, inside an apk, apk internals
An APK is a ZIP archive holding everything Android needs to install an app: compiled DEX bytecode, the AndroidManifest, resources and assets, native libraries, and a signing block. Its size, plus extracted runtime caches, is what shows up as installed app size.
- An APK is a ZIP containing classes.dex, AndroidManifest.xml, resources.arsc, res/, assets/, and lib/.
- Native libraries live under lib/ split by ABI, e.g. arm64-v8a; apps ship as AABs that generate split APKs.
- Installed size includes the ART/Dalvik cache plus app cache and data, not just the downloaded package.
What's inside an APK
An APK (Android Package) is structurally a ZIP archive with a defined layout. The main entries are classes.dex (one or more files of compiled Dalvik/ART bytecode), AndroidManifest.xml (a binary-encoded manifest of components and permissions), resources.arsc (a compiled table of strings, dimensions, and other resources), a res/ folder of resources, an assets/ folder of raw files, and lib/ holding native .so libraries organized by ABI such as arm64-v8a.
Every installed APK also carries a signing block and META-INF/ entries so Android can verify the app's signature (APK Signature Scheme v2 and later sign the whole archive). At install time the package manager validates this signature before the app is allowed to run.
From APK to installed footprint
Modern apps are usually built and distributed as an Android App Bundle (AAB), and the store generates per-device split APKs so a phone downloads only the language, density, and ABI it needs. Large media that won't fit comfortably can ship as separate OBB expansion files.
Installed size is more than the downloaded APK. The system extracts native libraries, and ART compiles bytecode into optimized machine code stored in the Dalvik/ART cache under the app's data area. On top of that, the running app accumulates its own app cache and user data. That total of base package, ART cache, plus caches and data is what device storage screens and a cleaner report as the app's footprint, where the cache portion is the safe-to-reclaim part.