Python tool to decompile, patch, and recompile XAPK files. Designed for security analysis, it automates network traffic sniffing configuration and patched binary deployment.
- Linux Environment
- Python 3.x
- Java JDK (Required for APKTool and apksigner)
-
Install Dependencies Run the setup script to download necessary tools and libraries:
chmod +x dependencies_linux.sh ./dependencies_linux.sh
-
Verify Java Ensure Java JDK is installed and in your PATH:
java -version
python run.py <input_xapk> [options]| Argument | Description |
|---|---|
input_xapk |
Required. Path to the target XAPK file. |
--network-fix |
Injects a network security configuration to allow app traffic analysis. |
--extract-native-libs |
Sets extractNativeLibs="true" in the manifest (fixes loading issues). |
--pause |
Pauses execution after patching but before rebuilding. Allows for manual file modification. |
--install |
Installs the patched APK to a connected ADB device after rebuilding. |
Basic patch:
python run.py game.xapk --network-fixPatch, fix libs, and install to device:
python run.py app.xapk --network-fix --extract-native-libs --installTo remove temporary build directories and artifacts:
chmod +x clean.sh
./clean.sh