Genymotion Setup

Genymotion is one of the fastest and most flexible Android environments for pentesting. It boots quicker than the Android Studio Emulator, offers smoother performance, exposes ADB cleanly, supports root out of the box, and integrates easily with Burp Suite, Frida, and custom network setups. This chapter provides a full-length, in-depth, hands-on configuration, covering installation, networking, rooting, certificate installation, system modification, data extraction, API redirection, instrumentation, and everything needed to turn Genymotion into a complete Android pentesting lab.


Installing Genymotion and VirtualBox

Genymotion Desktop depends on VirtualBox to run virtual devices. Begin by installing both.

  1. Install VirtualBox

  2. Install Genymotion Desktop

  3. Launch Genymotion

  4. Sign into your Genymotion account

  5. Click Add to create a new virtual device

  6. Choose a device profile such as Pixel 3, Pixel 4, Pixel 5

  7. Select an Android version (Android 8–11 recommended for maximum compatibility)

  8. Create and start the virtual device

On first boot, you will see a clean Android environment that behaves like a real phone but is far easier to manipulate.


Connecting to Genymotion Through ADB

Genymotion exposes ADB automatically. Check for the device:

adb devices

If nothing appears, manually connect:

adb connect 192.168.56.101:5555

Depending on your host-only adapter, the IP may vary. Verify connection:

adb shell

ADB access enables installation, data extraction, Frida deployment, and traffic manipulation.


Root Access in Genymotion

Genymotion devices ship with root access enabled by default. Confirm:

adb shell
su

If you see a root prompt, you are ready for system-level pentesting. Root access allows:

  • Changing system files

  • Installing system CA certificates

  • Inspecting app private directories

  • Editing /etc/hosts

  • Running Frida without restrictions

If root is not available in your build, recreate the device using a Google APIs image or older Android version.


Installing APKs for Pentesting

Install a target APK:

adb install app.apk

Reinstall:

adb install -r app.apk

Install after modifying an APK:

adb install -r -d app.apk

This is useful when repackaging or altering code using apktool.


Configuring Burp Suite Proxy

To intercept traffic:

  1. Open Settings inside Genymotion

  2. Go to Network & Internet

  3. Select the active Wi-Fi

  4. Long press → Modify Network

  5. Set Proxy → Manual

  6. Host: your computer’s IP

  7. Port: 8080

Test connectivity:

adb shell ping <your_host_ip>

If it responds, traffic can now flow through Burp.


Installing Burp CA Certificate into System Store

Most apps do not trust user-installed CA certificates. For full network interception, install Burp CA into the system certificate store.

Export Burp certificate (DER format):

cacert.der

Push certificate:

adb push cacert.der /sdcard/

Remount system as writable:

adb root
adb remount

Move certificate to system CA folder:

adb shell
su
mv /sdcard/cacert.der /system/etc/security/cacerts/9a5ba575.0
chmod 644 /system/etc/security/cacerts/9a5ba575.0

Reboot the device:

adb reboot

Genymotion will now trust your proxy for TLS interception.


Installing and Running Frida Server

Frida is required for bypassing SSL pinning, root detection, tamper checks, and runtime protections.

Push Frida server to the device:

adb push frida-server /data/local/tmp/
adb shell "chmod 755 /data/local/tmp/frida-server"

Start Frida server:

adb shell "/data/local/tmp/frida-server &"

Verify:

frida-ps -U

Inject SSL bypass script:

frida -U -f com.app -l ssl_bypass.js --no-pause

This restores MITM capability for apps with strict certificate pinning.


Extracting App Data from /data/data

With root access, inspect private app storage.

List installed packages:

adb shell pm list packages

View app directory:

adb shell ls /data/data/<package>/

Extract SharedPreferences:

adb pull /data/data/<package>/shared_prefs/ .

Extract SQLite databases:

adb pull /data/data/<package>/databases/ .

Check for:

  • Tokens

  • Passwords

  • API keys

  • Session IDs

  • Logs

  • Internal data

  • Cached PII

This is a critical part of static and dynamic analysis.


Inspecting Logs in Real Time

Genymotion logs are extremely verbose. Monitor application behavior:

adb logcat

Filter by package:

adb logcat | grep <package>

Look for:

  • Hardcoded URLs

  • Debug messages

  • Stack traces

  • Sensitive data leaks

Log analysis directly exposes vulnerabilities and network endpoints.


Editing /etc/hosts for API Redirection

Redirect app traffic to your own server:

adb root
adb remount
adb shell
su
echo "10.0.3.2 api.example.com" >> /etc/hosts

In Genymotion:

  • Host machine IP = 10.0.3.2

Use this for:

  • Redirecting production calls

  • Endpoint fuzzing

  • Mocking responses

  • Injecting malicious payloads


Intercepting Requests Without Proxy (Manual Routing)

Some apps bypass proxy settings. Force routing using iptables:

adb shell
su
iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to-destination 10.0.3.2:8080

This ensures Burp catches traffic even if the app tries to evade standard proxying.


Installing Google Play Services (If Required)

Some apps require Firebase, FCM, Maps, or Google Login. Install GApps using Genymotion’s built-in module:

  1. Start the device

  2. Click Open GApps button

  3. Accept installation

  4. Reboot

You now have a Play Store-enabled pentesting environment.


Taking Snapshots

Snapshots let you revert to a clean state instantly.

Steps:

  1. Open Genymotion

  2. Select your device

  3. Click Snapshots

  4. Create a snapshot after full setup

Use snapshots to quickly revert after:

  • Malware analysis

  • Repackaging tests

  • Destructive operations


Deep Network Inspection with Host-Only Mode

Genymotion uses a host-only network which helps in pentesting:

  • Device and host see each other directly

  • Avoids router-level restrictions

  • Ideal for MITM and packet capture

Capture packets with tcpdump on host-only interface.


Dynamic Instrumentation with Frida Hooks

Sample hook for tracing API calls:

Java.perform(function() {
    var httpUrlConn = Java.use("javax.net.ssl.HttpsURLConnection");
    httpUrlConn.getInputStream.implementation = function() {
        console.log("HTTPS Request Triggered");
        return this.getInputStream();
    };
});

Run:

frida -U -f com.app -l trace.js --no-pause

This reveals network behavior in real time.


Testing Sensors, GPS, and Movement

Genymotion allows simulation of:

  • GPS location

  • Battery levels

  • Network type

  • Movement

  • Orientation

Set custom GPS:

adb emu geo fix <longitude> <latitude>

Example:

adb emu geo fix 72.8777 19.0760

Used to test location-based vulnerabilities.


Full Practical Genymotion Pentesting Workflow

  1. Install Genymotion + VirtualBox

  2. Create Pixel device with Android 8–11

  3. Ensure ADB connectivity

  4. Enable root access

  5. Configure Burp Suite proxy

  6. Install Burp CA at system level

  7. Install target APK

  8. Intercept traffic

  9. Start Frida server

  10. Bypass SSL pinning

  11. Inspect app private storage

  12. Modify hosts file for redirection

  13. Use logcat for debugging

  14. Simulate GPS, sensors, and network changes

  15. Snapshot device state for quick rollback

  16. Perform dynamic instrumentation and exploitation

This configuration produces a complete, professional-grade Android pentesting environment.


Intel Dump

  • Genymotion offers fast virtual devices ideal for pentesting

  • Provides built-in root, ADB access, and VirtualBox networking

  • Supports Burp proxy routing and system-level CA installation

  • Frida enables bypassing SSL pinning and protections

  • Root access allows extracting /data/data for analysis

  • Hosts file modification enables redirecting APIs

  • Logcat monitoring reveals sensitive data and endpoints

  • GPS, sensors, and environment simulation help test advanced app logic

  • Snapshots allow instant rollback to a clean test state

HOME COMMUNITY CAREERS DASHBOARD