Setup Android Pentesting Environment on Debian Linux

This guide covers setting up a mobile testing environment, including installation of Genymotion, Frida, Drozer, APK Signer, Medusa, and Jadx. Each tool is critical for analyzing and testing Android applications in a controlled, virtual environment.

Install Java

sudo apt update
sudo apt install default-jre
sudo apt install default-jdk

Install Genymotion

Genymotion is a powerful Android emulator ideal for penetration testing.

  1. Download Genymotion: Genymotion Official Website

  2. Install: Follow the installation wizard for your operating system.

  3. Create Android Virtual Devices (AVDs): Open Genymotion and add a virtual device by selecting a specific Android version and device model.

Install Burp

Frida And Burp on Genymotion

Python is essential for Frida, and most Debian-based systems come with it pre-installed. To verify and install Python if necessary, follow these steps:

Verify Python Installation:

If not installed, use:

Install Frida using pip:

Download the Frida Server for your emulator’s Android version: Frida Releases

Push Frida Serve and burp on Genymotion:

Setup burp proxy

  1. Proxy Listener

  1. Proxy settings for WiFi

  1. Install Certificate

Setting Up Drozer

Drozer is a useful Android security framework for penetration testing.

To use drozer globally, add an alias in your shell configuration file (~/.zshrc or ~/.bashrc):

Then, reload your shell configuration with source ~/.zshrc or source ~/.bashrc.

Setting up Jadx

Install APKTool

  1. Download the Linux wrapper script. (Right click, Save Link As apktool)

  2. Download the latest version of Apktool.

  3. Rename the downloaded jar to apktool.jar.

  4. Move both apktool.jar and apktool to /usr/local/bin. (root needed)

  5. Make sure both files are executable. (chmod +x)

  6. Try running apktool via CLI.

Install Dex2Jar

APK Signer

APK Signer is required to sign APKs. It comes with the Android SDK’s build tools, so you need to install android-sdk to access it.

  1. Install the Android SDK and APK Signer:

  2. Sign an APK:

    Replace my-release-key.jks with your keystore file and unsigned.apk with the file you want to sign.

Magisk

Last updated

Was this helpful?