EN
ENNA

Getting Started Guide

How to Install and Use APKTool

This guide covers installing APKTool and using it to decompile, modify, and rebuild Android APK files.

Prerequisites

  • -Java 8+
  • -An APK file to analyze
Official Documentation
1

Install APKTool

Install APKTool from your package manager or download the jar.

macOS

brew install apktool

Debian/Ubuntu

sudo apt install apktool

Verify

apktool --version
2

Decompile an APK

Decode an APK into its components - smali code, resources, manifest, and assets.

Decompile

apktool d target.apk -o output/

What you get

ls output/
# AndroidManifest.xml  - App permissions and components
# res/                 - Decoded resources (layouts, strings, images)
# smali/               - Dalvik bytecode in smali format
# assets/              - Raw asset files

Note: APKTool decodes to smali (Dalvik assembly), not Java. Use JADX if you want Java source. APKTool is better when you need to modify and rebuild the APK.

3

Analyze the Manifest

The AndroidManifest.xml reveals permissions, activities, services, receivers, and exported components.

View manifest

cat output/AndroidManifest.xml | grep -E 'permission|activity|service|receiver|exported'

Note: Look for exported components (exported=true) - these are accessible to other apps and are common attack surfaces. Excessive permissions are also a red flag.

4

Modify and Rebuild

Make changes to the decompiled APK and rebuild it.

Rebuild

apktool b output/ -o modified.apk

Sign the APK

keytool -genkey -v -keystore test.keystore -alias test -keyalg RSA -keysize 2048 -validity 10000
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore test.keystore modified.apk test

Note: Rebuilt APKs must be signed to install on a device. The signature won't match the original, so apps with signature verification will detect the modification.

Back to APKToolFull Documentation