What is the APK file format?
A file with an .apk extension contains a compressed archive with an application, game, or firmware for the Android system. APK packages are built on the ZIP/JAR container format, which means any standard archive tool can open and inspect their contents. Google Play originally imposed a 100 MB limit on .apk downloads, with up to two expansion files of up to 2 GB each for additional resources; since August 2021, Google Play requires new apps to be published as .AAB (Android App Bundles), which generate device-optimized split APKs at install time rather than shipping a single monolithic package.
Structure of APK file
Structure of APK files is based on the JAR archive - they may contain the following subfolders and files:
res- with a description of the resources in an uncompiled form,lib- contains compiled sources and application libraries, divided according to different computing platforms (e.g.,arm64-v8a,x86_64),META-INF- with files containing information about the package, for instance theMANIFEST.MFfile, or certificates,assets- which contains various resources used by the app,classes.dex- compiled Dalvik/ART bytecode executed by the Android runtime,AndroidManifest.xml- binary-encoded manifest declaring the app's permissions, components, and SDK requirements,resources.arsc- precompiled resource table mapping IDs to strings, layouts, and drawables.
Android Package files are used to create and distribute programs for mobile platforms operating on the Android system. The content of .apk files can be unpacked with most decompression programs supporting ZIP compression, or inspected by simply renaming the file to .zip. To maintain integrity, packages are protected by APK Signature Scheme v2/v3 (and v4 for incremental updates), with installation refused if the signature does not match. Installing .apk packages from outside the Play Store is not permitted by default - users must enable the Install unknown apps permission in Android settings, or push the package via adb install app.apk. Apps too large for a single .apk may be distributed as .XAPK, which bundles a base APK with one or more split APKs in a single archive.
Security & safety
RISK: HIGHAPK is the #1 Android malware vector: sideloading bypasses Google Play Protect scanning. Risk checklist for users: install only from trusted sources (Google Play, F-Droid, APKMirror - which verifies signatures against the developer's), check that requested permissions match the app's purpose, never install an APK that arrived unsolicited via chat/SMS ("smishing" campaigns), and compare the app's signature when updating. The rename-to-zip trick lets you inspect contents before installing.
Format details
in a nutshellPrograms that open APK files
Technical details
deep spec| Encoding | Binary |
| Byte order | Little-endian |
| Container | ZIP archive (also valid as JAR) |
| Compression | DEFLATE per entry; alignment-sensitive entries stored uncompressed (STORED method) and zipaligned |
| Signing / integrity | APK Signature Scheme v2/v3 (block inserted before ZIP central directory); v4 for incremental on-device updates; install refused on signature mismatch |
| Magic bytes | 50 4B 03 04 - standard ZIP "PK" local-file header at offset 0; distinguished from plain ZIP by presence of AndroidManifest.xml and classes.dex |
| Internal files | AndroidManifest.xml, classes.dex (+ classes2.dex …), resources.arsc, res/, lib/, assets/, META-INF/ |
| Bytecode | Dalvik Executable (DEX) in classes.dex - compiled from Java/Kotlin source, executed by ART (Android Runtime) |
| Alignment | zipalign enforces 4-byte boundary for uncompressed entries; Android 15+ targets 16 KB page alignment |
| Manifest format | Binary-encoded XML (AXML) declaring package name, permissions, Activity/Service/Provider components, minSdkVersion, targetSdkVersion |
| Native lib layout | lib/<ABI>/ subdirectory per architecture: arm64-v8a, armeabi-v7a, x86, x86_64 |
| Resource table | resources.arsc - flat binary file mapping integer resource IDs to strings, layouts, drawables, and configuration variants |
| Typical size | 2 MB - 1.5 GB; base app APKs commonly 5-100 MB; games with bundled assets reach the upper range |
| MIME type | application/vnd.android.package-archive |
| Platform | Android (native); runnable on Windows, Linux, macOS via emulators (BlueStacks, Android Studio AVD, Waydroid) |
| Released | 2008 (Android 1.0) |
| Latest version | APK Signature Scheme v3 (Android 9, 2018); v4 incremental (Android 11, 2020) |
| Open standard | Yes · royalty-free |
| Specification | source.android.com |