Bleeding-edge builds of ApkTool.
ApkTool v2.3.1-212330-SNAPSHOTuses smali and baksmali version
Remember to delete the following folder:
so you’ll enjoy the new
You can, also, extract the
and place it there manually.
ApkTool uses smali and baksmali (and other useful libs) internally,
and you do not need to download an additional.. anything really..
If you want to, you can download them all in a jar format,
which you can use to update other tools (“Android Kitchen” and such..),
simply browse the following links:
smali and baksmali:
– bitbucket.org/JesusFreke/smali/downloads/ (for both)
– github.com/testwhat/SmaliEx/releases – an updated MOD that supports multi-dex, includes both, plus
– about smali: github.com/JesusFreke/smali.
– ApkTool on XDA: forum.xda-developers.com/showthread.php?t=1755243.
– ApkTool build process: iCompile – Build ApkTool
drag&drop APK over the cmd file, to extract it to a folder the same name.
@echo off call java.exe -jar "apktool.jar" --verbose d "%~1" pause
same as before, slightly faster since no need smali-up things, used only to extract the resources or view the decoded XML text-content, you can even try built it back with the same code, useful if you just want to modify non-code resources, such as making themes (but there are easier way to do it.. such as with XPOSED-Framework..)
@echo off call java.exe -jar "apktool.jar" --verbose -s d "%~1" pause
drag&drop the (previously decoded) folder, and get an apk in the
buildsub-folder, it tries to build the same content and same (?) signature, which is useful in-case you havn’t changed too much.. if you wish you can specify
aapt, which you can download from here: https://github.com/eladkarako/Pre-Built-Binary-AAPT-For-Windows-Linux-And-MacOS.
@echo off java -jar apktool.jar --verbose -c --aapt "aapt.exe" b "%~1" pause
same as before, but force build, useful if you want to ignore the change-detection and build anyway.
@echo off java -jar apktool.jar --verbose -c -f --aapt "aapt.exe" b "%~1" pause
drag&drop previously decoded folder, get an apk-file that included all the changes, unsigned (sign it yourself..), it is useful if you want to build an entire project without trying to mock the original-apk exactly.
@echo off java -jar apktool.jar --verbose --aapt "aapt.exe" b "%~1" pause
same as above, but (for some reason..) full the change-detection to think there was no change, to force built the folder into apk.
@echo off java -jar apktool.jar --verbose -f --aapt "aapt.exe" b "%~1" pause
How to sign? (quick tip)
See: Generate KeyStore And Sign Anything for more easy-drag&drop commands for signing the result-apk. Keep in-mind to delete old signatures from the
/META-INF/folder (CERT.RSA, CERT.SF, MANIFEST.MF, …), but do not delete any sub folder such as
com\google\android\since they are often used to have useful scripts placed there to not-disrupt the overall checksum.
Align after you’ve signed! not before, not both before and after.
drag&drop any file to align it (apk, zip, jar,…) it will keep the original name, with the suffix
_aligned, and the same extension.
@echo off set FILENAME_IN=%~s1 set FILENAME_OUT=%~d1%~p1%~n1_aligned%~x1% call zipalign.exe -v 4 %FILENAME_IN% "%FILENAME_OUT%" pause