๐ ๏ธ APK/JAR Patching Tools
Utilities for patching Android Apps and JARs.
apktoolโ
Runs apktool with custom arguments.
Argument | Description |
---|---|
ARG | Apktool options |
apktool --help
apktool d -f "/sdcard/app.apk" -o "$TMP/output"
warning
It is recommended to use dynamic_apktool to avoid errors.
signโ
Runs zipsigner with custom arguments.
Argument | Description |
---|---|
ARG | Zipsigner options |
sign --help
sign "/sdcard/app.apk" "/sdcard/app_signed.apk"
decode_xmlโ
Decodes an AndroidManifest.xml file.
Argument | Description |
---|---|
XML | XML file |
decode_xml "$TMP/AndroidManifest.xml"
note
It is NOT necessarily compatible with other types of encrypted XMLs, nor of res/layout
, res/drawable
, ...
encode_xmlโ
Encodes an AndroidManifest.xml or other predecoded APK XMLs.
Argument | Description |
---|---|
XML | XML file |
encode_xml "$TMP/AndroidManifest.xml"
patch_apkโ
Injects a folder into an APK with optional signing/zipaligning.
Argument | Description |
---|---|
FOLDER | Folder to inject |
APK | APK file |
OPT | sign , zipalign (optional) |
patch_apk "FOLDER" SystemUI.apk sign
patch_apk "FOLDER" SystemUI.apk zipalign
make_overlayโ
Compiles an overlay for Android 9+.
Argument | Description |
---|---|
PRI | Priority level |
PKG | Target package |
RES | Resource folder |
OUT | Output APK path |
make_overlay 1 com.android.systemui "FOLDER" "/system/vendor/overlay/test.apk"
note
All contents of the folder are merged into the root of the overlay. For example, the res
folder should exist within the specified directory (FOLDER\res
).
warning
Cannot include images due to apktool limitations.