apktool
БесплатноБез исполняемых скриптовНе проверенAndroid application reverse engineering, resource decoding, Smali bytecode disassembly, resource modification, and rebuild toolchain. Decodes binary XML…
от smartworldarafath★ 68 звёзд на GitHubОб этом скилле
Apktool — Android Binary Reverse Engineering & Resource Toolchain
A specialized toolchain and methodology for reverse engineering third-party, closed, binary Android applications (APKs and AABs). Apktool decodes binary resources to nearly original form and rebuilds them after modifications, allowing fine-grained inspection of Smali bytecode, layout XMLs, manifests, and compiled assets.
Core Capabilities
- Binary XML & Resource Decoding: Decodes binary XMLs (
AndroidManifest.xml, layout files, value tables) andresources.arscinto human-readable XML files. - Smali Disassembly: Disassembles Dalvik executable (
.dex) files into structured Smali assembly representation, preserving package and class hierarchy. - Resource Modification & Injection: Allows direct modification of assets, strings, styles, drawables, and permission declarations.
- Rebuilding & Repackaging: Reassembles modified Smali code and decoded resources back into a valid APK structure.
- Framework Management: Installs and manages OEM-specific framework files required for decoding proprietary manufacturer resources (Samsung, HTC, LG, Xiaomi).
- Signing & Alignment Pipeline: Completes the workflow with
zipalign4-byte boundary alignment andapksignercryptographic verification.
Installation & Setup
Prerequisites
- Java Runtime Environment (JRE) or Java Development Kit (JDK) 11 or higher
- Android SDK Build-Tools (for
zipalignandapksigner)
Execution Wrapper
Ensure apktool.jar is available on the system PATH or invoke directly via Java:
# Direct jar invocation
java -jar apktool.jar <command> [options]
# Via wrapper script (if installed globally)
apktool <command> [options]
Operational Workflows
1. Decoding an APK (Decompilation)
Decode an APK including resources and Smali code into a designated output directory:
# Standard complete decode
apktool d target_app.apk -o output_dir
# Force overwrite existing output directory
apktool d -f target_app.apk -o output_dir
# Decode without decompiling code (resources only)
apktool d -s target_app.apk -o output_dir_resources_only
# Decode without decoding resources (code/smali only)
apktool d -r target_app.apk -o output_dir_smali_only
# Keep broken or unresolvable resources for salvage analysis
apktool d -k target_app.apk -o output_dir
2. Output Directory Structure
When decoded, the project directory contains:
AndroidManifest.xml: Clean, readable manifest showing all activities, services, broadcast receivers, content providers, intent filters, and permissions.apktool.yml: Build metadata containing version info, compression flags, and original framework dependencies.res/: Decoded resources (values/strings.xml, layout/.xml, drawable/.xml, xml/network_security_config.xml).smali/(andsmali_classes2/,smali_classes3/for Multidex): Disassembled Smali code files mirroring the Java package hierarchy.assets/: Raw embedded application assets (fonts, JSON databases, local bundles, HTML/JS assets).lib/: Native shared libraries (.so) organized by ABI (arm64-v8a,armeabi-v7a,x86,x86_64).original/: OriginalMETA-INF/signatures and untouched manifest.
3. Smali Code Inspection & Patching
Inspect and modify Smali instructions inside smali/ or smali_classes*/:
- Bypassing Certificate Pinning:
Locate
TrustManagerimplementations or OkHttpCertificatePinnercalls in Smali and replace conditional verification jumps with unconditional return statements (return-void). - Disabling Root Detection:
Find methods checking for
subinaries or test-keys build tags, and patch return values to returnconst/4 v0, 0x0followed byreturn v0. - Enabling Debugging & Cleartext Traffic:
Edit
AndroidManifest.xmlto addandroid:debuggable="true"andandroid:usesCleartextTraffic="true"inside the<application>tag. - Configuring Custom Network Security:
Inject a custom
res/xml/network_security_config.xmlto trust user-installed CA certificates for proxy traffic inspection.
4. Handling OEM Framework Dependencies
When decoding applications that rely on vendor-specific system resources:
# Install framework file into Apktool local store
apktool if framework-res.apk
# Install custom tag framework (e.g. for specific OEM builds)
apktool if com.htc.resources.apk -t htc
5. Rebuilding the APK
Reassemble the modified project directory into an APK package:
# Standard rebuild
apktool b output_dir -o modified_app_unsigned.apk
# Rebuild with aapt2 enabled (recommended for modern Android Gradle Plugin outputs)
apktool b --use-aapt2 output_dir -o modified_app_unsigned.apk
6. Alignment & Cryptographic Signing
A rebuilt APK must be aligned and signed before installation on a device or emulator:
# Step 1: Align package on 4-byte boundaries
zipalign -p -f -v 4 modified_app_unsigned.apk m
Установить apktool в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл apktool?
Android application reverse engineering, resource decoding, Smali bytecode disassembly, resource modification, and rebuild toolchain. Decodes binary XML resources (resources.arsc, AndroidManifest.xml, layouts, drawables) to human-readable form, disassembles classes.dex into Smali bytecode for step-by-step logic inspection, enables asset and resource patching, rebuilds modified packages, and integrates with zipalign and apksigner for signature re-alignment. Use when decompiling Android APKs, analyzing Smali code, modifying app manifests or assets, or rebuilding and testing modified Android binaries.
Как установить скилл apktool?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл apktool запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic