Use Burp Suite with Genymotion Desktop

2024-05-07

Prerequisites

Step 1 – Setting up Burp Suite

Step 2 – Upload and install the Burp Suite Certificate

Android 14+

Android 12-13

  openssl x509 -inform DER -in Burp_cert.der -out Burp_cert.pem
  openssl x509 -inform PEM -subject_hash_old -in Burp_cert.pem |head -1
  

  mv Burp_cert.pem 9a5ba575.0
  

  adb root
  adb shell 'mount -o rw,remount /'
  

  adb push 9a5ba575.0 /system/etc/security/cacerts/
  

  adb shell chmod 644 /system/etc/security/cacerts/9a5ba575.0
  

Android 11 and below

Step 3 – Set Android global proxy to Burp Suite proxy

  adb shell settings put global http_proxy <burp_proxy_ip>:<burp_listening_port>
  

  adb shell settings put global http_proxy 192.168.1.84:8080
  

  adb shell settings put global http_proxy :0
  

Extras

With VirtualBox

  adb shell settings put global http_proxy 10.0.3.2:8080
  

With QEMU

  adb shell settings put global http_proxy localhost:3333
  

  adb reverse tcp:3333 tcp:8080
  

Script with gmtool to automate the process

Start script example

#!/bin/bash
## Start your device with gmtool.
## We assume Genymotion is installed in your Home folder.
$home/genymotion/gmtool admin start "your_device_name"

## Set Burp Suite proxy as global proxy to the device.
## We use proxy IP 10.0.3.2 and port 8080. Replace with your own settings.
## We use Genymotion built-in ADB.
$home/genymotion/tools/adb shell settings put global http_proxy 10.0.3.2:8080

Start script example (Windows)

@echo off
REM Start your device with gmtool.
REM We assume Genymotion is installed in "C:\Program Files".
C:\Program Files\Genymobile\Genymotion\gmtool.exe admin start "your_device_name"

REM Set Burp Suite proxy.
REM We use proxy IP 10.0.3.2 and port 8080. Replace with your own settings.
REM We use Genymotion built-in ADB
C:\Program Files\Genymobile\Genymotion\tools\adb shell settings put global http_proxy 10.0.3.2:8080

Stop script example

#!/bin/bash
## Remove the global proxy settings.
$home/genymotion/tools/adb shell settings put global http_proxy :0

## Stop the running device.
$home/genymotion/gmtool admin stop "your_device_name"

Stop script example (Windows)

@echo off
REM Remove the global proxy settings.
C:\Program Files\Genymobile\Genymotion\tools\adb shell settings put global http_proxy :0

REM Stop the running device.
C:\Program Files\Genymobile\Genymotion\gmtool.exe admin stop "your_device_name"

Previous Next