An APK file is a ZIP archive containing Android app resources, code (classes.dex), and a manifest (AndroidManifest.xml). The magic is the standard ZIP signature 0x50 0x4B 0x03 0x04. APKs are distinguished by the presence of AndroidManifest.xml and classes.dex.