Android Package (APK) is the package file format used by the Android operating system, 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 (such as .dex files), 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 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.