Configure an Android device for network payload capture

Learn how to configure an Android device for network payload capture so you can create a configuration for network payload capture.

You’ll need to configure each Android device you want to use for network playload capture.

Before you start

You’ll need to:

Get device UDID

Connect the Android device to your personal computer, then enter the following command to get the device UDID:

adb shell settings get secure android_id

You’ll need this later. Copy it to a secure location.

Add certificate to device

Confirm the location of the certificate you downloaded earlier, then enter the following command:

adb push <path/to/certificate> sdcard
macOS
adb push ~/Downloads/mitmproxy-cert.crt sdcard
Windows
adb push C:\Users\Alex\Downloads\mitmproxy-cert.crt sdcard

Install certificate

Android 11 or later

On the Android device, open Settings, Biometrics and security, then Other security settings.

Select Install from the device storage, then CA certificate.

Choose Install anyway, then select the certificate.

Other Android versions

On the Android device, open Settings, then Explore.

Select the certificate.

If the device doesn’t have a passcode already, you’ll be asked to create one. Follow the on-screen instructions to create a passcode.

Remove device passcode

If your device has a passcode, open Settings, then Security.

Select Screen lock, enter your passcode, then select screen lock: None.

Select Yes, remove to delete all passcode.

Create config file

Safely disconnect the device from your computer. In the terminal, open the directory for the device UDID you copied earlier using the following command:

cd ~/Library/"Application Support"/Kobiton/devices/<device-udid>
Example
cd ~/Library/"Application Support"/Kobiton/devices/a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2

In the device UDID directory, create a file named config and add the following content:

{
  "unlockPasscodeEnabled": false,
  "networkPayloadCaptureEnabled": true
}

When you’re finished, save your changes. Now you can create a configuration for network payload capture.