A command-line tool that minimize APKLab for patching and modifying Android APK files with MITM capabilities.
npm install @paulcoding810/apk-patcher
Create a config.json
file in your project root with the following structure:
{
"UBER_APK_SIGNER_PATH": "/path/to/uber-apk-signer.jar",
"APKEDITOR_PATH": "/path/to/apkeditor.jar",
"APKTOOL_PATH": "/path/to/apktool.jar",
"OUTPUT_PATCH_PATH": "/path/to/patches/output",
"EDITOR": "code" // or any preferred text editor
}
apk-patcher config
apk-patcher --edit-config
apk-patcher merge <path-to-apk>
apk-patcher <path-to-apk>
This command will:
- Decode the APK
- Initialize a git repository
- Apply MITM patches
- Open the project in your configured editor
- Start a build-test loop where you can:
- Build and install the modified APK (enter 'y')
- Save changes and generate patch file (enter 'n')
- Quit without saving (enter 'q')
- APK decompilation and recompilation
- Automatic MITM patching
- Git integration for tracking changes
- Automatic APK signing
- Direct installation to connected Android device
- Patch file generation
- Build and test loop for rapid development
When working with an APK, the tool creates the following structure:
patches/
└── [package-name]/
└── [version].patch
- Requires an Android device connected via ADB for testing
- Automatically handles APK signing
- Generates patch files for version control
- Supports multiple device handling
- Maintains git history of modifications