Install JADX on Ubuntu 20.04

Install JADX on Ubuntu 20.04

JADX is a tool for reverse engineering Android applications. This tool allows to decompile bytecode to Java source code from APK and DEX files. It also allows to decode resources such as XML files and images. JADX provides CLI and GUI.

This tutorial shows how to install JADX on Ubuntu 20.04.

Prepare environment

Java is required for JADX. You can read post how to install Java.

You also need to install zip tool for unzipping archives.

sudo apt install -y zip

Install JADX

Retrieve the latest version tag of JADX release and assign it to variable.

JADX_VERSION=$(curl -s "https://api.github.com/repos/skylot/jadx/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')

Download ZIP archive from releases page of the JADX repository.

curl -Lo jadx.zip "https://github.com/skylot/jadx/releases/latest/download/jadx-${JADX_VERSION}.zip"

Unzip archive:

unzip jadx.zip -d jadx-temp

Create directory where JADX files will be stored:

sudo mkdir -p /opt/jadx/bin

Move JADX files to specified directory:

sudo mv jadx-temp/bin/jadx /opt/jadx/bin
sudo mv jadx-temp/bin/jadx-gui /opt/jadx/bin
sudo mv jadx-temp/lib /opt/jadx

The jadx is command line version and jadx-gui is UI version.

Add /opt/jadx/bin directory to the PATH environment variable. It can be set in /etc/profile file. In this case, jadx and jadx-gui will be available for all users as a system-wide commands.

echo 'export PATH=$PATH:/opt/jadx/bin' | sudo tee -a /etc/profile

You can logout and login to your machine to make changes to take effect. However, you can run the following command to apply the changes immediately:

source /etc/profile

You can check JADX version:

jadx --version

ZIP archive and temporary directory is no longer needed, remove them:

rm -rf jadx.zip
rm -rf jadx-temp

Testing JADX

Download APK file:

sudo curl -o test.apk https://raw.githubusercontent.com/appium-boneyard/sign/master/tests/assets/tiny.apk

Run jadx command to decode APK file:

jadx test.apk

In this case, decoded files are placed in test directory.

Uninstall JADX

If you want to completely remove JADX, delete the installation directory:

sudo rm -rf /opt/jadx

Remove entry from /etc/profile file:

sudo sed -i '/export PATH=\$PATH:\/opt\/jadx\/bin/d' /etc/profile
source /etc/profile

Leave a Comment

Cancel reply

Your email address will not be published.