Android: How to Install ADB, APK's, and JADX-GUI on Parrot OS
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!
Installing ADB & APK's
Once you have started up your Parrot OS system, open up a terminal using CTRL + ALT + T and run the following command: sudo apt-get update.
Then we can install adb with the following command sudo apt-get install android-tools-adb.
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.
Good job! When we head back to our emulated device we can see that our app is now installed onto our device.😄
Installing JADX-GUI
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
Then, we can go over to where we downloaded it, go into jadx > build > jadx > bin, and double click on JADX-GUI. Select the option to run it in the terminal.
If that does not work for you, you can cd into the jadx directory, and run the jadx-gui command directly.
It works! Now we can select our Diva APK that we extracted and pop it into the window that just opened. We can see that we can now access most of the source code of the app.
BONUS: JADX-GUI Bash Script
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
Or if you had to follow the second execution step (running jadx-gui directly), you will need to type the following:
#!/bin/bash
cd /home/yourname/Downloads/jadx && 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.
Run the following command: chmod +x run_jdx_gui. Now when you click on the script it (or run it in the terminal via ./run_jdx-gui) will open up the terminal and run the app!
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❤️)
Subscribe to my newsletter
Read articles from Christine Coomans directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Christine Coomans
Christine Coomans
I'm just a developer who loves making cool applications, games, and tools using a variety of technologies and engines. When I'm not busy coding, I enjoy sharing my knowledge of development and other tech topics that I find interesting through written content and YouTube videos.