1 需求
- 获取smali/dex:默认获取smali,-s后,获取dex
- -s,--no-src Do not decode sources.
- xx
- -r,--no-res Do not decode resources.
- 输出到指定目录
- -o,--output
The name of folder that gets written. Default is apk.out
- -o,--output
- 静默输出,即输出是不显示详细信息,该参数必须作为第一个参数
- -q,–quiet
- Apktool反编译APK时,有warning信息,Java调用Runtime.getRuntime.exec()方法生成子进程反编译APK时,getErrorStream()如果一直不被读取,会导致缓存信息存满,该子进程卡死
- 解决方案一:使用-q参数,不输出详细信息
- 解决方案二:
- Apktool 命令大全,不全你来打我
- Java process.waitFor() 卡死问题
官网地址:
https://github.com/iBotPeaches/Apktool
2 语法
D:>java -jar apktool.jar Apktool v2.6.1 - a tool for reengineering Android apk files with smali v2.5.2 and baksmali v2.5.2 Copyright 2010 Ryszard Wi?niewskiCopyright 2010 Connor Tumbleson usage: apktool -advance,--advanced prints advance information. -version,--version prints the version then exits usage: apktool if|install-framework [options] -p,--frame-path Stores framework files into . -t,--tag Tag frameworks using . usage: apktool d[ecode] [options] -f,--force Force delete destination directory. -o,--output The name of folder that gets written. Default is apk.out -p,--frame-path Uses framework files located in . -r,--no-res Do not decode resources. -s,--no-src Do not decode sources. -t,--frame-tag Uses framework files tagged by . usage: apktool b[uild] [options] -f,--force-all Skip changes detection and build all files. -o,--output The name of apk that gets written. Default is dist/name.apk -p,--frame-path Uses framework files located in . For additional info, see: https://ibotpeaches.github.io/Apktool/ For smali/baksmali info, see: https://github.com/JesusFreke/smali
3 示例
4 参考资料
Apktool 命令大全,不全你来打我_北京朝阳区精神病院院长的博客-CSDN博客_apktool命令
5 异常
- I:getInputStream()
- W:getErrorStream()



