APKtool
用途:获取mainifest.xml res等资源文件
下载:http://ibotpeaches.github.io/Apktool/install/
使用:apktool d test.apk
dex2jar
用途:获取项目源码的jar包
下载:https://github.com/pxb1988/dex2jar
用法:
1、解压apk获取classes.dex文件
2、通过命令 ./dex2jar-2.0/d2j-dex2jar.sh classes.dex来生成可以用JD-GUI工具查看的class.jar包
注:解压后dex2jar.zip文件后需修改可执行文件属性
chmod +x d2j-dex2jar.sh d2j_invoke.sh
JD-GUI
用途:查看.jar包源码工具
附:反编译apk 批处理文件
目录结构:
[objc] view plain copy
- apktool src_dex2jar-2.0.zip
- apktool.jar test
- decode-apk.sh test-dex2jar.jar
- dex2jar test.apk
- jd-gui-0.3.5.osx.i686.dmg
decode-apk.sh文件,使用./decode-apk.sh test.apk
[javascript] view plain copy
- echo 开始反编译[email protected]
- [email protected]
- filePath=${fullPath%‘.apk‘}
- echo 开始提取资源文件...
- apktool d [email protected]
- #java -Xmx512M -Djava.awt.headless=true -jar apktools/apktool.jar -f d -o "${filePath}" [email protected]
- echo 开始解压classes.dex...
- unzip -od "${filePath}" [email protected] classes.dex
- echo 开始反编译classes.dex为classes_dex2jar.jar...
- dex2jar/d2j-dex2jar.sh "${filePath}/classes.dex" -f -o "${filePath}/classes.jar"
- echo 恭喜,反编译完成,请到${filePath}目录下查看
参考:
http://www.bkjia.com/Androidjc/938414.html
http://blog.csdn.net/ttdevs/article/details/42297905
时间: 2024-10-09 15:20:20