Android application package


Android Package is the package file format used by the Android, and a number of other Android-based operating systems for distribution and installation of mobile apps, mobile games and middleware.
APK is analogous to other software packages such as APPX in Microsoft Windows or a Debian package in Debian-based operating systems. To make an APK file, a program for Android is first compiled using Android Studio, and then all of its parts are packaged into one container file. An APK file contains all of a program's code, resources, assets, certificates, and manifest file. As is the case with many file formats, APK files can have any name needed, but it may be required that the file name ends in the file extension ".apk" for being recognized as such.
The Android system allows users to manually install APK files only after they turn on an "Unknown Sources" setting that allows installation from sources other than trusted ones like Google Play. One may do so for many reasons, such as to install apps not found on the store, or to install an older version. Although one can downgrade an app this way by uninstalling the new version first, doing it via Android Debug Bridge is better as it allows for keeping data.

Package contents

An APK file is an archive that usually contains the following files and directories:
Created-By: 1.0
SHA1-Digest-Manifest: wxqnEAI0UA5nO5QJ8CGMwjkGGWE=
...
Name: res/layout/exchange_component_back_bottom.xml
SHA1-Digest: eACjMjESj7Zkf0cBFTZ0nqWrt7w=
Name: res/drawable-hdpi/icon.png
SHA1-Digest: DGEqylP8W0n0iV/ZzBx3MW0WGCA=