Metadata-Version: 2.4
Name: apkdev
Version: 2.0.1
Summary: The complete Android APK toolkit — build, reverse engineer, extract metadata, manage devices
Author: cyberdash
License: MIT
Project-URL: Homepage, https://github.com/earendil-works/apkdev
Project-URL: Source, https://github.com/earendil-works/apkdev
Project-URL: BugTracker, https://github.com/earendil-works/apkdev/issues
Keywords: android,apk,reverse-engineering,apktool,jadx,smali,mobile,security
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: Android
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Embedded Systems
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: click>=8.0
Requires-Dist: rich>=13.0

# APKDev

📱 **The complete Android APK toolkit** — build, reverse engineer, mod, extract metadata, and manage devices.  
One `pip install` and you have everything you need to work with APKs.

```bash
pip install apkdev
```

## Features

**37 commands** covering the full APK lifecycle — from zero to running APK, and from APK to modded rebuild.

### 🏗️ Build
| Command | What it does |
|---------|-------------|
| `apkdev new MyApp` | Scaffold a Kotlin + Compose + Material 3 project |
| `apkdev build` | Compile APK via Gradle |
| `apkdev sign app.apk` | Sign with debug/release key |
| `apkdev optimize app.apk` | Zipalign + sign in one step |

### 📲 Device (ADB)
| Command | What it does |
|---------|-------------|
| `apkdev install app.apk` | Install to device |
| `apkdev uninstall com.example` | Remove app |
| `apkdev pull com.example` | Pull APK from device |
| `apkdev packages` | List installed packages |
| `apkdev devices` | List connected devices |

### 🧪 RE / Modding Pipeline
| Command | What it does |
|---------|-------------|
| `apkdev decode app.apk` | Decompile APK to smali with apktool |
| `apkdev rebuild dir/` | Rebuild APK from smali directory |
| `apkdev sign app.apk` | Sign the rebuilt APK |

### 🔬 Native Analysis
| Command | What it does |
|---------|-------------|
| `apkdev elf lib.so` | Parse ELF headers, sections, symbols |
| `apkdev disasm lib.so` | Full ARM64/ARM/x86 disassembly with Capstone v5 |
| `apkdev strings lib.so` | Extract readable strings from binaries |
| `apkdev patch lib.so` | Binary patching (hex, NOP, find/replace, dump) |
| `apkdev debug lib.so` | Interactive hex viewer + patcher |

### 🎯 Specialized RE
| Command | What it does |
|---------|-------------|
| `apkdev dart libapp.so` | Extract Dart AOT class/method names (Flutter) |
| `apkdev go libgojni.so` | Extract Go function names (Go backends) |

### 🔧 Setup & Utils
| Command | What it does |
|---------|-------------|
| `apkdev setup` | Auto-install Java, SDK, Gradle, aapt2, RE tools |
| `apkdev doctor` | Check environment health |
| `apkdev info app.apk` | Dump APK metadata |
| `apkdev icon app.apk` | Extract app icon |
| `apkdev manifest app.apk` | Print decoded manifest |
| `apkdev permission app.apk` | List all permissions |
| `apkdev cert app.apk` | Show certificate info |
| `apkdev compare a.apk b.apk` | Diff two APKs |

## Quick start

```bash
# Install
pip install apkdev

# Setup everything (auto-installs Java, SDK, Gradle, RE tools)
apkdev setup

# Create and build a Compose + Material 3 app
apkdev new NotesApp
cd NotesApp
apkdev build      # → NotesApp/app/build/outputs/apk/debug/app-debug.apk

# Or de/reconstruct an existing APK
apkdev decode some.apk -o decoded/
# Edit smali files...
apkdev rebuild decoded/ -o modded.apk
apkdev sign modded.apk
apkdev install modded.apk
```

## Zero-to-APK guarantee

`apkdev` handles everything automatically:
- **Java**: Auto-installed via `pkg` (Termux), `apt` (Linux), `brew` (macOS), `choco` (Windows)
- **Android SDK**: Downloaded + configured with platforms android-34/36
- **Gradle**: Embedded wrapper generator
- **aapt2**: Automatic ARM64 override for x86_64 JAR conflicts
- **RE tools**: jadx, apktool, dex2jar, smali, baksmali, APKEditor, androguard, capstone

Tested zero-to-APK on Termux (ARM64) with full wipe. Works on Linux, macOS, Windows.

## Modding workflow

```bash
# 1. Decode
apkdev decode target.apk -o decoded/

# 2. Edit smali (e.g., patch a login check)
# Change: if-eqz v4, :cond_0
# To:     if-nez v4, :cond_0

# 3. Rebuild
apkdev rebuild decoded/ -o modded.apk

# 4. Sign & install
apkdev sign modded.apk
apkdev install modded.apk
```

Tested end-to-end on real Flutter + Go APKs including Spotify-based apps.

## Requirements

- Python 3.8+
- Android device or emulator (for install/uninstall commands)
- Internet connection (first `apkdev setup` downloads SDK + tools)

## License

MIT
