What is APK?
APK (Android Package Kit) is the application installation package format for the Android operating system, containing all the code, resources, manifest, and signing information needed to run an app. This page systematically covers APK file structure, signing schemes (v1/v2/v3/v4), APK vs AAB differences, installation methods, and how to generate APK files for free with ToApp locally on your phone.
Key Takeaways
- APK is the Android app installer format, similar to .exe on Windows — it contains code, resources, manifest, and signatures
- APK has four signing scheme generations (v1/v2/v3/v4); newer versions are backward compatible, and Android verifies signature integrity before installation
- Key difference between APK and AAB: APK is directly installable; AAB must be split by an app store before distribution
- Android natively supports sideloading — enable "Unknown sources" to install APKs from non-store channels
- ToApp compiles APKs locally on your phone — no cloud uploads, no coding required
- APK also has variants like .apks / .xapk / .apkm / Split APK / OBB, mainly for device-specific delivery and large expansion resources
Definition
APK stands for Android Package Kit. It is the file format used by the Android operating system for distributing and installing mobile apps. Similar to .exe on Windows or .dmg on macOS, an APK file is essentially a ZIP archive containing all the code (.dex bytecode), resources (images, layouts, strings), manifest (AndroidManifest.xml), native libraries (.so), and signing information (META-INF/) needed to run an Android app. Users can download and install APKs directly without going through an app store.
APK File Structure In Detail
Renaming an APK file extension to .zip lets you unzip and inspect its internal structure. A typical ToApp-generated APK contains the following entries:
| File/Directory | Purpose | Meaning for ToApp Users |
|---|---|---|
| AndroidManifest.xml | App manifest declaring package name, version, permissions, activities, min SDK | App name, package name, and version you set in ToApp are written here |
| classes.dex | Compiled Dalvik/ART bytecode containing app logic | Compiled output of ToApp's native shell Java/Kotlin code |
| resources.arsc | Compiled resource index table | Fast lookup table for app icons, strings, and other resources |
| res/ | Resource files (images, layout XML, strings) | App icon, splash screen, bottom nav icons are stored here |
| assets/ | Raw asset files (HTML/CSS/JS), not resource-compiled | When using "Local HTML/ZIP mode", web files live here |
| META-INF/ | Signing and certificate info (MANIFEST.MF, CERT.SF, CERT.RSA) | ToApp writes its debug signature into this directory |
| lib/ | Native libraries in ABI subdirectories (armeabi-v7a, arm64-v8a, x86_64) | .so files required for WebView to run |
Tip: Use unzip -l app.apk or Android Studio's APK Analyzer to inspect APK internals.
APK Format Evolution Timeline
- 2008Android 1.0 released; APK established as the app installer format using JAR signing (v1)
- 2014Android 5.0 introduced the ART runtime, compiling APKs to native code (AOT) at install time
- 2016Android 7.0 introduced APK Signature Scheme v2 — full-package signing for faster verification and tamper resistance
- 2018Android 9.0 introduced Signature Scheme v3 with key rotation support
- 2021Google Play mandated AAB (Android App Bundle) uploads for new apps, splitting into device-specific APKs at distribution
- 2023Android 14 expanded APK Signature Scheme v4 with incremental install support
APK vs AAB Comparison
Since August 2021, Google Play requires new apps to be uploaded in AAB format, but APK remains the final format actually installed on user devices. Key differences:
| Dimension | APK | AAB (Android App Bundle) |
|---|---|---|
| Nature | Final installable package | Publishing format, must be split by store before install |
| Distribution | Any channel (stores, websites, internal, ADB) | Google Play only |
| Device-specific | One package fits all (may contain redundant resources) | Store generates minimal APKs per device ABI/resolution/language |
| Size | Larger | Smaller actual download size for users |
| Barrier | Low — any Android device can install directly | High — requires Google Play services and store flow |
| Use cases | Internal distribution, enterprise deployment, testing, sideloading, ToApp output | Formal Google Play store listing |
ToApp generates APKs directly (not AABs) so users can install on any Android device without going through an app store — better suited for enterprise distribution, portfolios, blog-to-app, and other use cases.
APK Variants: .apks / .xapk / .apkm / Split APK / OBB
Beyond the standard single APK file, the Android ecosystem has spawned multiple packaging and distribution formats to handle large app sizes, device-specific packages, and expansion resources. These formats are commonly seen on third-party app markets (APKPure, Aptoide, APKMirror) and in enterprise distribution:
| Format | What it is | Source / Use | Directly installable? |
|---|---|---|---|
| .apk | Single ZIP installer file | Android's official installer format, natively supported on all devices | Yes — tap to install |
| .apks | ZIP containing base.apk + multiple split APKs (by ABI / resolution / language) | Generated by Google bundletool from AAB for device-specific distribution | No — requires adb install-multiple or installers like SAI / APKMirror Installer |
| .xapk | ZIP containing base APK + OBB data + manifest.json | APKPure, Aptoide, and other third-party markets for distributing large apps with expansion data | No — must be parsed and installed by the corresponding market's installer |
| .apkm | ZIP similar to .apks but with higher compression | APKMirror Installer's own format for distributing Split APKs | No — requires APKMirror Installer |
| Split APKs | Multiple standalone .apk files (base + config.xxx.apk) | Native splitting mechanism since Android 5.0; Google Play delivers per device characteristics | No — must use adb install-multiple base.apk split_config.arm64_v8a.apk in one command |
| .obb | Opaque Binary Blob — expansion resource data pack | Legacy APK Expansion File solution for up to 2x2GB of extra resources (being replaced by AAB and split APK) | No — must be paired with the main APK and placed in /Android/obb/<packageName>/ |
ToApp always generates a standard single-file APK — no installer required, installable on any Android device directly. It's the most universal and convenient format. Split APK, .apks, .xapk and other variants primarily serve scenarios that need device-specific delivery or large expansion data.
How to Install APK
APK installation falls into four categories by use case:
- Direct install (on phone): Transfer the APK to your Android phone, enable "Settings → Apps → Special app access → Install unknown apps," then tap the APK to install
- ADB install (for developers): Enable USB debugging and connect to a computer, then run
adb install app.apk; use-rto overwrite,-dto allow version downgrade - App store: Download via Google Play, Huawei AppGallery, Xiaomi GetApps, etc. — the store handles signature verification and version management
- Sideloading: Download the APK from any channel (websites, email, WeChat Work, DingTalk) and install manually — natively supported by Android
APK Signing Schemes In Detail
APK signatures prove the app is from a trusted source and hasn't been tampered with. Android has four signing scheme generations; newer versions are backward compatible:
| Scheme | Introduced | Characteristics |
|---|---|---|
| v1 (JAR signing) | Android 1.0 | Based on META-INF MANIFEST.MF / .SF / .RSA files; only verifies individual files, not the whole package, can be tampered with |
| v2 | Android 7.0 (2016) | Full-package signing — signs the entire ZIP, faster verification at install, tamper-resistant |
| v3 | Android 9.0 (2018) | Adds key rotation on top of v2 — old keys can endorse new keys |
| v4 | Android 11 (2020) | Supports incremental install; requires v2/v3, ADB install only |
ToApp-generated APKs use a debug keystore by default and can be installed on any Android device. To publish on Google Play, re-sign with your own release key using apksigner.
Common ADB and Signing Commands
Developers commonly use these commands when testing and distributing APKs:
APK and Web-to-App Conversion
Web-to-app tools like ToApp package website content into an APK. The generated APK embeds a WebView component that loads a specified website URL or local web files. After installation, users can browse the website as if using a native app, with a custom icon, splash screen, bottom navigation bar, dark mode, and other native experiences.
Compared to browser bookmarks or PWA "Add to Home Screen", a standalone APK can be listed on app stores, distributed independently, version-controlled, and ships with a full desktop icon and launch animation — significantly improving user retention.
How ToApp Generates APKs
APK is ToApp's final output. ToApp compiles and signs the APK locally on the phone — no computer, no cloud uploads, complete data privacy.
- Resource compilation: App name, icon, package name, and version you set are written into
AndroidManifest.xmlandres/ - Local generation: ToApp compiles the APK on-device with no cloud uploads — the entire process runs offline, ensuring data privacy
- Debug signing: Generated APKs use a debug keystore and can be installed on any Android device directly
- Store publishing: To publish on Google Play, re-sign with
apksignerusing your own release key and convert to AAB - ADB install: Use
adb installto deploy ToApp-generated APKs to connected devices — convenient for developer testing - Internal distribution: Generated APKs can be shared via WeChat Work, DingTalk, email, or QR codes without an app store listing
APK Size Optimization Tips
ToApp-generated WebView apps are typically only a few MB, but you can optimize further:
- Use vector icons (SVG/Vector Drawable) instead of multi-resolution PNGs to shrink
res/ - In Local HTML/ZIP mode, minify HTML/CSS/JS files and remove unused fonts and images
- Use WebP instead of JPEG/PNG for splash screens
- Pack only target ABIs (e.g., arm64-v8a only) to significantly reduce
lib/size - Avoid placing unreferenced resources in
assets/
Common Use Cases
APK is a universal installer format suitable for many distribution scenarios. ToApp users commonly generate APKs for:
- Blog to App: Bloggers package WordPress / Hexo / Hugo blogs as standalone APKs
- Business: Companies package their website as an APK for trade shows, sales visits, and client demos
- E-commerce: Convert Shopify / WooCommerce stores to APKs to boost repurchase rates
- Portfolio: Designers and photographers package portfolio sites as APKs to send to clients
- Offline App: Package local HTML/ZIP as fully offline APKs
- Developer: Internal testing, demo builds, CI/CD artifact distribution
Common Misconceptions About APK
Myth: APK files are unsafe
Fact: APKs have a robust signature verification mechanism. ToApp-generated APKs use standard Android signing, and the system verifies signature integrity before installation. You can inspect APK signatures with apksigner verify to confirm trustworthiness. The real risk isn't the APK format itself — it's sideloaded APKs from untrusted sources.
Myth: Only app stores can install APKs
Fact: Android natively supports sideloading — just enable "Allow installation from unknown sources" to install APKs directly. Enterprise distribution, developer testing, and personal portfolios don't require app store listings.
Myth: AAB has replaced APK
Fact: AAB is only the upload format for Google Play listings — the final format installed on user devices is still an APK (split by the store per device). Outside Google Play, APK remains the only universal installer format.
FAQ
APK (Android Package Kit) is the application installation package format for the Android operating system, containing all the code, resources, and configuration files of an app, similar to .exe installers on Windows.
APK is the final installable package; AAB (Android App Bundle) is a publishing format introduced by Google in 2021 that must be split by Google Play into device-specific APKs before distribution. ToApp generates APKs directly, bypassing store splitting — ideal for internal distribution, enterprise deployment, and developer testing.
On an Android phone, enable "Allow installation from unknown sources," then tap the APK file to install. You can also use the ADB command adb install app.apk to install on a connected device.
There are four APK signing schemes: v1 (JAR signing, based on META-INF), v2 (introduced in Android 7.0, full-package signing), v3 (introduced in Android 9.0, supports key rotation), and v4 (introduced in Android 11, supports incremental install). ToApp-generated APKs use debug signing and can be installed directly.
APK itself has no hard size limit, but Google Play limits uploaded AABs to 200MB; APK Expansion Files allow up to 2x2GB of additional resources. ToApp-generated WebView apps are typically only a few MB.
APKs have a robust signature verification mechanism, and Android verifies signature integrity before installation. However, sideloading APKs from untrusted sources carries risk — only install APKs from trusted channels. ToApp compiles on-device without uploading any data to the cloud.
Use apksigner verify --print-certs app.apk to view APK signing certificates, or keytool -printcert -jarfile app.apk to view the signature chain.
ToApp-generated APKs use debug signing for direct installation and testing. Publishing to Google Play requires re-signing with your own release key and converting to AAB format per Google's policy.
Use ToApp — enter a website URL or upload local HTML/ZIP web files, set the app name, icon, and package name, then click generate to get an installable APK file. The entire process runs locally on your phone.
Common causes: "Allow installation from unknown sources" not enabled, signature conflict (an app with the same package name but different signature is already installed), incompatible Android version, or insufficient storage. Try adb install -r to overwrite, or uninstall the old version first. See ToApp FAQ for details.
A .apks file is a ZIP archive generated by Google's bundletool from an AAB, containing base.apk plus multiple split APKs (by ABI, resolution, language). It can't be installed by tapping — you must use adb install-multiple or tools like SAI / APKMirror Installer to merge and install.
A .xapk file is an extended format used by third-party app markets like APKPure and Aptoide. It's essentially a ZIP containing the main APK, OBB expansion data files, and a manifest.json. It can't be installed directly on Android — it must be parsed and installed by the corresponding market's installer, mainly used to distribute large apps (like games).
A regular APK is a single file containing all resources; a Split APK splits an app into one base.apk plus multiple config.apk files (e.g., config.arm64_v8a.apk, config.xxhdpi.apk), delivered per device characteristics to significantly reduce download size. Split APKs must be installed in one shot via adb install-multiple — natively supported since Android 5.0. ToApp always generates single-file APKs for the simplest install experience.
Related Terms
Generate APK for Free
Use ToApp to package any website or local web page as an Android APK for free — no coding, 3 minutes on your phone.
Download ToApp Free →