APK files are archive files based on the JAR format, which, as we know from Chapter 8, Reversing Bytecode Languages: .NET, Java, and More, implements the ZIP format. What this means is that APK files can be unpacked using any software supporting ZIP-compressed files.
Usually, APK files contain the following files:
- res: This directory contains various resource files (such as XMLs and pictures)
- META-INF: Mainly stores metadata files about the package:
- MANIFEST.MF: Manifest file containing names and SHA1/SHA2 digests of files inside the APK
- <name>.RSA: Contains the application's signature and certificate
- <name>.SF: Contains SHA1/SHA2 digests of the corresponding lines in the MANIFEST.MF and the list of associated resources
- AndroidManifest.xml: Main manifest file defining various important app-related values for the system and Google Play
- classes.dex: Compiled file containing the app's DEX bytecode; there can be several of them named classes<num>.dex
- resources...