Course contentsShow
← Security
Lesson 2724 of 3,05251. Mobile SecurityFree lesson

Decompiling and Disassembling Mobile Apps

Using tools like apktool, jadx, dex2jar, and Hopper to convert compiled code back to readable formats.

Decompiling and Disassembling Mobile Apps

What you'll learn: How to convert compiled mobile app binaries back into human-readable code using specialized reverse engineering tools.

Why Convert Compiled Code Back?

Mobile apps ship as compiled binaries—APKs for Android, IPAs for iOS—which are difficult to read directly. Decompiling and disassembling transform these binaries into formats you can analyze, helping you find vulnerabilities, understand malware behavior, or verify security controls.

Think of it like translating a locked diary: the original developer wrote in plain language (source code), locked it (compiled it), and you're now using special tools to read what's inside.

Core Tools for Mobile Reverse Engineering

Android Tools

apktool reconstructs the APK structure, extracting resources and converting Dalvik bytecode to Smali (assembly-like format). It's perfect for understanding app layout and modifying resources.

jadx decompiles DEX (Dalvik Executable) files directly to Java source code, making it highly readable. This is often your first stop for understanding Android app logic.

dex2jar converts DEX files to JAR format, which you can then open with Java decompilers like JD-GUI for another view of the code.

iOS Tools

Hopper is a disassembler for iOS binaries (Mach-O files), converting ARM/ARM64 machine code into assembly instructions and attempting to reconstruct higher-level pseudocode. It's essential for analyzing compiled iOS apps.

How They Work Together

You typically chain these tools: use apktool to unpack an APK, then jadx to read the Java logic, or dex2jar followed by a Java decompiler for alternative perspectives. For iOS, Hopper provides both disassembly and decompilation views.

The output isn't perfect—variable names become generic, and some logic is obfuscated—but it's sufficient for security analysis, identifying hardcoded secrets, or understanding encryption implementations.

Key Takeaway: Decompiling tools like apktool, jadx, dex2jar, and Hopper translate compiled mobile app binaries back into readable code formats, enabling security researchers to audit app behavior and discover vulnerabilities hidden in the implementation.