Lesson 1.42: Anatomy of an Android app (APK)
An Android app is delivered as an APK: a ZIP archive with a fixed layout. AndroidManifest.xml declares the app's identity, permissions and components; classes.dex holds the compiled code; resources, assets and native libraries sit beside them; and a signature covers it all. Inside the APK the manifest and XML resources are in a compiled binary format, so you need a tool like apktool to read them. In the lab you look inside Northwind Shop 3.2.0: the file type, the entries, the identity aapt reports, the binary manifest, and the decoded one.
15 min
You will learn to
- Explain what an APK contains
- List an APK's entries
- Read package name, version and SDK levels
- Explain binary XML
- Decode an APK with apktool
Key terms
- APK
- Android Package: the ZIP file an Android app is installed from.
- AndroidManifest.xml
- Declares the package name, permissions and components (activities, services, receivers, providers).
- DEX / smali
- classes.dex is compiled code for Android's runtime; smali is a readable text form of it.
- minSdk / targetSdk
- The oldest Android version that can install the app / the version whose rules the app follows.
- apktool
- Decodes an APK's binary XML and resources and disassembles its code to smali.
← How malware gets in · All lessons · Layered models: OSI and TCP/IP →