Recently I have dived into the journey of learning how to hack, or more precisely pen-testing. Since I focused previously on Android Pentesting when I explained how to install Genymotion and VirtualBox on Parrot OS, I thought, why don't I write another tutorial on how to install ADB and JADX-GUI on Parrot OS as it is related and quite easy to do. This tutorial assumes you have Android Studio and Parrot OS installed. A good Android Studio installation tutorial can be found here.
In case you wonder, the version I use of Parrot is the Security Edition, which comes with most tools installed.🤠
First, let's go over ADB and JADX-GUI. Android Debug Bridge (ADB) is a command-line tool that lets us communicate with a device, but more importantly for this tutorial, install APKs onto our emulated device. JADX-GUI is at its core a code decompiler, so we can take our APK that we downloaded and pop it into the decompiler and voila, we can see all the source code that it contains!
Once it has been installed, we can check if it "worked" by opening Genymotion and running our installed device. Check my previous tutorial on how to do this. Once your emulated device is up and running, we can go back to our terminal and type in adb devices. We can see that we get a list of devices that are attached, one of which is our emulated device.
From there on, we need to install an APK to install onto our device. An APK put simply, is a packaged app that we can download and install for testing purposes. Twelve-year-old me would be so shocked to know that that is how my friend copied their GTA San Andreas game onto my phone!😶
The APK that we will download in this tutorial is the Diva APK. You can download the APK here. Once you have downloaded it, head over to your Downloads folder and extract it by right-clicking and saying extract here.
Finally, we can download our apk. Head back into your terminal, making sure you are in the directory of your APK and that you have extracted the DIVA file. Type in the following command: adb install diva-beta.apk.
Now that we have our ADB and APK installed, we can now use this APK in JADX-GUI to decompile the code. ADB allowed us to access the app. JADX-GUI will allow us to access the app's code.
To install JADX-GUI, we can simply do the following in the terminal:
- sudo apt-get install jadx
- git clone https://github.com/skylot/jadx.git
- cd jadx
- ./gradlew dist
To have to go to the directory where JADX-GUI is every time we want to open/use it is tedious, and time-wasting. Thus we can create a quick bash script to save on our desktop to quickly run it when needed. In Pluma, type in the following:
#!/bin/bash cd /home/yourname/Downloads/jadx/build/jadx/bin && ./jadx-gui
Save this file as whatever, like run_jdx_gui. Save it in the directory of your desktop (or wherever you save your bash scripts), and then you can open up a new terminal and cd into the directory where run_jdx_gui is stored.
That's it for now, I hope this made sense. Let me know if you need help. See ya next time!
(You can see this post on my GitHub and pull it for future use❤️)