Skip to content

Proxying Mobile Chrome Browser Traffic: Virtual Device

TIP

For convenience, consider adding all installed tools/tool packages to your system PATH environment variable to avoid navigation/the need to use absolute paths in commands.

To proxy HTTP/HTTPS traffic generated by the Chrome application (the default mobile browser installed on Android devices):

  1. Launch the device by clicking on the button of its table row.

  2. On the device, navigate to the Settings interface and select Network & internet.

  3. Click on the Wi-Fi settings.

  4. Click on the button of the AndroidWifi SSID.

  5. Click on the button and expand the Advanced options drop-down menu.

  6. Click on the drop-down menu under Proxy and select Manual.

  7. Set the Proxy hostname to 127.0.0.1, the Proxy port to 8080, and click Save.

Android proxy settings.
  1. In the Projects interface of the Android Studio window, click on the More Actions button and select SDK Manager.
SDK Manager.
  1. Select Android SDK from the Languages & Frameworks drop-down menu.

  2. Open a terminal and navigate to the file system location stated in the Android SDK Location field.

Android SDK Location.
  1. Navigate into the platform-tools directory.

  2. Execute the adb tool with devices to ensure the device is listed.

bash
./adb devices
List of connected virtual Android devices.
  1. Execute the adb tool with the device ID as the value of the -s argument and reverse tcp:8080 tcp:8080 to forward traffic to Caido.
bash
./adb -s <device-id> reverse tcp:8080 tcp:8080
  1. With Caido running, navigate to http://127.0.0.1:8080/ca.crt in your device's browser.

  2. Click on Download to download Caido's CA certificate.

  3. Click on Close in the notification window and navigate to the Settings interface.

  4. In the Search settings input field, search for and select Install a certificate.

  5. Click on Install a certificate and select CA certificate.

  6. In the security notification screen click on Install anyway and select Caido's ca.crt file.

TIP

To verify the addition of the certificate:

  1. On the device, navigate to the Settings interface.

  2. In the Search settings input field, search for and select Trusted credentials.

  3. Click on Trusted credentials and locate Caido in the User tab certificate list.

Once the certificate has been installed, navigate to any domain using either the http:// or https:// scheme and view the HTTP History traffic table in Caido to inspect the traffic.

NOTE

If traffic is not appearing in the HTTP History table in Caido, try:

  • Disabling Mobile data usage.

  • Disabling any VPN connections.

  • Setting the Wi-Fi Proxy hostname to 10.0.2.2.