一:apktool的安装和使用:apktool会提取apk文件中的资源,图片,xml等文件。
进入官网Apktool Install(https://ibotpeaches.github.io/Apktool/install/) ,介绍如下:
- Linux:
- Download Linux wrapper script (Right click, Save Link As
apktool
) - Download apktool-2 (find newest here)
- Make sure you have the 32bit libraries (
ia32-libs
) downloaded and installed by your linux package manager, if you are on a 64bit unix system. - (This helps provide support for the 32bit native binary aapt, which is required by apktool)
- Rename downloaded jar to
apktool.jar
- Move both files (
apktool.jar
&apktool
) to/usr/local/bin
(root needed) - Make sure both files are executable (
chmod +x
) - Try running apktool via cli
按照步骤一步一步来就是了:1.右击链接保存为 apktool2.下载最新的apktool-23.确定是否有 32 bit libraries4.5.下载的文件改名为apktool.jar6.移动两个文件到 /usr/local/bin这里,我是把两个文件放在 donwload 目录里,进入目录 : sudo mv -i apktool apktool.jar /usr/local/bin/ ,输入密码后就移动好了7.给apktool 文件执行的权限:进入目录 cd /usr/local/bin/sudo chmod +x apktool apktool.jar然后就可以在任何目录执行 apktool 了比如在目录下反编译某个文件 apktool d app.apk - Download Linux wrapper script (Right click, Save Link As
- 如官网下载不了,可以去百度云下载:http://pan.baidu.com/s/1hsNzyF6
二:dex2jar安装和使用:用于将apk中的class.dex文件转化成jar包,然后使用jd-gui查看源码:http://pan.baidu.com/s/1hsNzyF6
下载dex2jar的zip包后,解压。将apk文件解压。
使用命令:sh dex2jar-2.1/d2j-dex2jar.sh ../../temp/calendar/classes.dex,会在当前目录生成jar包文件。
三:安装jd-gui:http://pan.baidu.com/s/1hsNzyF6
打开jd-gui,直接打开dex2jar中生成的jar包,就可以查看源码了。
来源:https://www.cnblogs.com/andy-loong/p/6800368.html