DEV Community

Cover image for Android: How to Install ADB, APK's, and JADX-GUI on Parrot OS
christine
christine

Posted on • Updated on

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.
adb

Then we can install adb with the following command sudo apt-get install android-tools-adb.
ADB Install Parrot

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.
ADB Install Parrot

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.
ADB Install Parrot

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.
ADB Install Parrot

Good job! When we head back to our emulated device we can see that our app is now installed onto our device.😄
APK WorkingAPK Working

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:

  1. sudo apt-get install jadx
  2. git clone https://github.com/skylot/jadx.git
  3. cd jadx
  4. ./gradlew dist

JADX-GUI Install ParrotJADX-GUI Install ParrotJADX-GUI Install Parrot

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.
JADX-GUI Install ParrotJADX-GUI Install Parrot

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.
JADX-GUI Install ParrotJADX-GUI Install Parrot

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
Enter fullscreen mode Exit fullscreen mode

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.

Bash ScriptBash Script

Run the following command: chmod +x run_jdx_gui. Now when you click on the script it will open up the terminal and run the app!
Bash ScriptBash Script

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❤️)

Top comments (0)