Android App Structure
APK internals.
Android App Structure is a free Ethical Hacking Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Ethical Hacking Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
The APK File
An Android app ships as an APK (Android Package). It is really a ZIP archive containing the compiled code, resources, and metadata.
Because it is a ZIP, you can simply unzip it to inspect its contents, which is the first step in mobile pentesting.
unzip app.apk -d app_extracted/Inside the APK
An extracted APK contains:
AndroidManifest.xml: app configuration.classes.dex: compiled bytecode.res/andresources.arsc: resources.lib/: native libraries.META-INF/: signing info.
The Manifest
The AndroidManifest.xml declares the app's components, permissions, and configuration. In the APK it is in a binary XML form that tools can decode.
It is the single most important file for understanding an app's attack surface.
DEX and the Runtime
Java/Kotlin source compiles to DEX (Dalvik Executable) bytecode in classes.dex. Modern Android runs it via ART (Android Runtime).
DEX can be converted back toward readable code, which is what static analysis of APKs exploits.
The Four Components
Android apps are built from four component types:
- Activities: screens / UI.
- Services: background work.
- Broadcast Receivers: respond to system events.
- Content Providers: share data between apps.
Exported Components
A component marked android:exported="true" can be invoked by other apps. If such a component performs sensitive actions without checks, it is an attack surface.
Pentesters hunt for exported activities, services, and providers that leak data or perform privileged actions.
<activity android:name=".AdminActivity" android:exported="true"/>Permissions
Apps request permissions in the manifest (for example INTERNET, READ_SMS, ACCESS_FINE_LOCATION).
Over-broad permissions hint at risky behavior or excessive data access. Custom permissions can also be misconfigured to allow unauthorized access.
<uses-permission android:name="android.permission.READ_SMS"/>App Sandbox
Android isolates each app in its own sandbox with a unique Linux UID. By default apps cannot read each other's data.
Vulnerabilities arise when apps weaken this boundary, such as world-readable files or exposed providers.
App Data Storage
An installed app stores private data under /data/data/<package>/: databases, shared preferences, and files.
On a rooted device or via backups, a pentester inspects this directory for secrets stored insecurely, which a later lesson explores.
/data/data/com.example.app/Signing
Every APK is digitally signed; the signature lives in META-INF/. Android verifies it on install and for updates.
If you modify and repackage an app, you must re-sign it, which is why developers rely on signing to detect tampering.
Native Libraries
Performance-critical or obfuscated logic may live in native libraries (.so files) under lib/, compiled from C/C++.
These are not in DEX, so they require separate analysis with native disassemblers. Developers sometimes hide secrets here, mistakenly believing native code is harder to inspect.
lib/arm64-v8a/libnative.soQuick Check
Recall which manifest attribute exposes a component to other apps.
Recap
You now understand Android app structure:
- An APK is a ZIP holding
AndroidManifest.xml,classes.dex, resources, and signing data. - Apps use four components; exported ones are attack surface.
- Permissions and the per-app sandbox govern access; private data lives in
/data/data/. - APKs are signed to detect tampering.
Next you will decompile an APK in static analysis.
Frequently asked questions
Is the “Android App Structure” lesson free?
Yes — the full text of “Android App Structure” is free to read here on the web, and the Ethical Hacking Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Ethical Hacking Academy course, upgrade to CoddyKit PRO.
What will I learn in “Android App Structure”?
APK internals. You practise Ethical Hacking Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Ethical Hacking Academy?
No prior experience is required. Ethical Hacking Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Android App Structure” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Ethical Hacking Academy lesson?
Yes. Every Ethical Hacking Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Android App Structure
- Static Analysis of APKs
- Dynamic Analysis with Frida
- Insecure Storage and Comms