APKTool
APKTool
Download && Install
A minimum of Java 8 is required to run Apktool.
Windows
As Windows is case-insensitive please adjust case sensitivity for correct operation.
- Download the Windows wrapper script. (Right click, Save Link As
apktool.bat
) - Download the latest version of Apktool.
- Rename downloaded jar to
apktool.jar
. - Move both
apktool.jar
andapktool.bat
to your Windows directory. (UsuallyC://Windows
) - If you do not have access to
C://Windows
, you can place the two files anywhere and add that directory to your Environment Variables System PATH variable. - Try running
apktool
via the command prompt.
Linux
- Download the Linux wrapper script. (Right click, Save Link As
apktool
) - Download the latest version of Apktool.
- Rename the downloaded jar to
apktool.jar
. - Move both
apktool.jar
andapktool
to/usr/local/bin
. (root needed) - Make sure both files are executable. (
chmod +x
) - Try running
apktool
via CLI.
Mac
- Download the Mac wrapper script. (Right click, Save Link As
apktool
) - Download the latest version of Apktool.
- Rename the downloaded jar to
apktool.jar
. - Move both
apktool.jar
andapktool
to/usr/local/bin
. (root needed) - Make sure both files are executable. (
chmod +x
) - Try running
apktool
via CLI.
Brew
- Install Homebrew as described in this page.
- Execute the command
brew install apktool
in the terminal. - Try running
apktool
via CLI.
Wrapper scripts are not needed but they are helpful, so you don’t have to type java -jar apktool.jar
repeatedly.
How to
decode
1
apktool decode -f <apk_path> -o <out_path>
Rebuild & Sign
1
2
3
apktool build -f {dir_path} -o <new_apk_path> --use-aapt2
<ANDROID_HOME>\build-tools\35.0.0\apksigner.bat sign --ks <keystore_path> --ks-pass pass:<keystore_pass> <new_apk_path>
本文由作者按照 CC BY 4.0 进行授权