DOCS
TRAFEXIADOCSAndroid Setup

Android Traffic Interception Setup

Trafexia supports intercepting all HTTP/HTTPS network traffic from both physical Android devices and Android Emulators (Android Studio Emulator, Genymotion, LDPlayer, NoxPlayer).


If you are developing or testing on Android Studio Emulator or any emulator with ADB enabled:

  1. Ensure your emulator is running and connected (adb devices lists the emulator).
  2. In Trafexia, open the Quick Connect widget from the header toolbar.
  3. Click "Set Proxy" under the Android Emulator (ADB commands) section.
  4. Trafexia automatically executes ADB commands to point the emulator's global HTTP proxy to your desktop IP and port 8888.
  5. Once testing is complete, click "Clear Proxy" to revert to direct internet access.

2. Manual Setup for Physical Android Devices

Step 1: Connect to Same Wi-Fi Network

Ensure your Android phone and the computer running Trafexia are connected to the exact same local Wi-Fi network.

Step 2: Configure Wi-Fi Proxy Settings

  1. On your Android phone, go to Settings ➔ Wi-Fi.
  2. Tap and hold or tap the gear icon next to your connected Wi-Fi network name.
  3. Select Modify Network ➔ Advanced Options.
  4. Set Proxy to Manual.
  5. Proxy Hostname: Enter your computer's local IP address (displayed on Trafexia's header, e.g., 192.168.1.50).
  6. Proxy Port: Enter 8888.
  7. Tap Save.

3. Installing Root CA Certificate on Android

To decrypt HTTPS encrypted traffic (SSL/TLS), install Trafexia's Root CA certificate onto the device:

Download the Certificate:

  1. Open Chrome on your Android device and visit: http://chocode.com.vn:8888/ca.crt (or open Trafexia Settings on your desktop, click Show File next to CA Certificate, and transfer rootCA.crt to your device).
  2. Rename the file extension to trafexia-ca.crt if prompted.

Install the Certificate:

  • Android 11+:
    1. Navigate to Settings ➔ Security & Privacy ➔ More Security Settings ➔ Encryption & Credentials.
    2. Tap Install a certificate ➔ CA certificate.
    3. Tap Install Anyway and select trafexia-ca.crt.
  • Android 10 & below:
    1. Navigate to Settings ➔ Security ➔ Install from Storage / SD Card.
    2. Select trafexia-ca.crt, name it "Trafexia CA", and set usage to Wi-Fi / VPN.

4. Bypassing SSL Pinning on Android 7.0+ (Nougat+)

Starting from Android 7.0 (API level 24), Android apps by default do not trust user-installed CA certificates.

To intercept HTTPS traffic for third-party production applications:

  1. Use Frida Scripts (Recommended):
    • Use automated Frida SSL Pinning bypass scripts generated inside Trafexia's AI Analyzer or APK Static Analyzer.
    • Execute: frida -U -f com.example.app -l ssl_pinning_bypass.js.
  2. Add network_security_config.xml for Apps in Development:
    <network-security-config>
        <base-config cleartextTrafficPermitted="true">
            <trust-anchors>
                <certificates src="system" />
                <certificates src="user" />
            </trust-anchors>
        </base-config>
    </network-security-config>
    
  3. Install to System Certificate Store (Rooted / Magisk Devices):
    • Use the AlwaysTrustUserCerts Magisk module to move Trafexia's CA certificate into /system/etc/security/cacerts/.