Compile and decompile Android applications with ease.
APK toolbox is a CLI wrapper around essential Android reverse-engineering and build tools (like Apktool). It streamlines the compilation and decompilation process so you don't have to remember long, complicated commands to do the job yourself.
It also provides full support for handling split APK formats, such as .xapk and .apks.
Note
The Android binary is designed to run in a Termux environment.
- Java JDK > 11
- Apktool
- APKEditor
- Android SDK Build Tools - no Android Studio?
Note
On Termux, the Android SDK Build Tools can be installed via
pkg install aapt2 apksigner -y- Download the Android SDK Command Line Tools
- Unzip the downloaded file
- Run
./cmdline-tools/bin/sdkmanager --sdk_root="." $(./cmdline-tools/bin/sdkmanager --sdk_root="." --list | grep "build-tools" | sort -t';' -k2 -Vr | head -1 | awk '{print $1}')PowerShell:
./cmdline-tools/bin/sdkmanager --sdk_root="." (./cmdline-tools/bin/sdkmanager --sdk_root="." --list | Select-String "build-tools" | Sort-Object { [version](($_ -replace '.*build-tools;(\S+).*','$1') -replace '-rc\d+','') } -Descending | Select-Object -First 1 | ForEach-Object { ($_ -split '\|')[0].Trim() })
- Accept the license agreements
- The Android SDK Build Tools will be downloaded in
build-tools/<VERSION>
Use either the help <cmd> command or the --help (-h) flag. The program will also guide you with errors.
- On Windows CMD, configuring a directory ending with a
\while wrapping it with double quotes"(such as"C:\Some\Example\Path\") will result in aPath not founderror.
Make sure you have the Rust toolchain installed.
git clone https://github.com/madkarmaa/apk-toolbox
cd apk-toolbox
cargo build --release --lockedImportant
To build for Android (aarch64-linux-android), you must have Docker running. Install and use cross instead of cargo.
cargo install cross --git https://github.com/cross-rs/cross
cross build --release --target aarch64-linux-android --lockedThe compiled binary will be available in the target/release/ directory (or target/{target}/release if cross-compiling).
Contributions are welcome! Feel free to open an issue or submit a pull request if you'd like to improve the tool or fix any bugs.
This project is licensed under the MIT License.