获取jadx版本号
curl -s "https://api.github.com/repos/skylot/jadx/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+'
输出:
lili@adam:~/development/reverse/tools$ curl -s "https://api.github.com/repos/skylot/jadx/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+' 1.4.6
得到当前最新jadx版本号是1.4.6。
2.下载jadx
curl -Lo jadx.zip "https://github.com/skylot/jadx/releases/latest/download/jadx-${JADX_VERSION}.zip"
lili@adam:~/development/reverse/tools$ curl -Lo jadx.zip "https://github.com/skylot/jadx/releases/latest/download/jadx-1.4.6.zip" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 100 9 100 9 0 0 3 0 0:00:03 0:00:02 0:00:01 3 lili@adam:~/development/reverse/tools$ ls jadx.zip
解压压缩包
lili@adam:~/development/reverse/tools$ unzip jadx.zip -d jadx-temp
添加jadx到环境变量
vim打开~/.profile文件,添加最下面添加下面的代码
# add jadx if [ -d "$HOME/development/reverse/tools/jadx-temp/bin" ] ; then PATH="$HOME/development/reverse/tools/jadx-temp/bin:$PATH" fi
然后
source ~/.profile
检查jadx是否安装成功
lili@adam:~$ jadx --version 1.4.6
测试jadx
lili@adam:~/development/reverse/apks$ jadx-gui tiktok.apk Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2633) at java.base/java.lang.Runtime.load0(Runtime.java:768) at java.base/java.lang.System.load(System.java:1837) at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method) at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2445) at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2501) at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2700) at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2651) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830) at java.base/java.lang.System.loadLibrary(System.java:1873) at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1399) at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1397) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1396) at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1429) at java.desktop/java.awt.Component.<clinit>(Component.java:621) at jadx.gui.settings.JadxSettings.<clinit>(JadxSettings.java:51) at jadx.gui.settings.JadxSettingsAdapter.load(JadxSettingsAdapter.java:64) at jadx.gui.JadxGUI.main(JadxGUI.java:24)
我执行jadx-gui报错了,因为jdk不完整。运行下面命令
sudo apt install openjdk-11-jdk --fix-missing
再次尝试打开jadx-gui
jadx-gui tiktok.apk
本文为Adamin90原创文章,转载无需和我联系,但请注明来自http://www.lixiaopeng.top