Sample Android Project

1. What's it?

Intercepting HTTPS traffic on Android Devices and Android Emulators is more complicated than iOS.

If you've struggled to config XML settings, let check out this sample project that we've already configured for you:

See HTTPS traffic (

Check out the Sample Config section to understand how the config is set up.

2.1 Prepare

  • Android Studio 4.0.1

  • Pixel 3 Emulator with API 27+ (We suggest that we should create a brand-new Emulator device rather than using the current one. Visit Android Virtual Devices windows in Android Studio)

  • Download a sample project at

If you're using Android API 30+, please follow the guideline to trust CA Proxyman Certificate

Automatic Script for Android Emulator

If you run this project on Android Emulator (Google APIs version), you can check out the Automatic Script and Proxyman provides to:

  • Set HTTP Proxy, Install, and Trust Proxyman Certificate automatically.

  • Then you can skip the step 2.2 and 2.3

2.2 Set Wifi Proxy to Proxyman

  • Open your Android Emulator -> Setting app -> Wifi: Make sure your Wifi connection is good. Sometimes, it's "Limited Connection" that you could not set the Wifi Proxy. If it happens, please remove the emulator and create a new one again.

  • Click on the Wifi then clicking on Edit Button in two places

  • Start set HTTP Proxy that the same IP and Port value from Android Guideline (Proxyman app -> Certificate -> Install Certificate on Android Devices)

Make sure the Proxy Hostname and Port match with the values in (Proxyman app -> Certificate -> Install Certificate on Android Devices)

2.3 Download and Install Proxyman Certificate

  • Open Google Chrome on your Android Emulator

  • Download the Certificate and select VPN and App Category

If you could not access, it means Wifi Proxy doesn't work. Please try to delete your Android Emulator and create a new one in Android Virtual Devices Manager from Android Studio

  • Turn OFF / ON the Wifi in Emulators might do the trick

  • At this stage, please verify that everything is good before moving to the next stage

If you're using Android API 30+, please follow the guideline to trust CA Proxyman Certificate

2.4 Start the sample project

  • After config the Proxy Wifi on your Android Emulator, please make sure to stop the sample app if you're opening

  • Make sure Proxyman app is opening

  • Start the sample project again in Android Studio and click the Fetch button on the top right navigation bar

  • At this stage, you can see HTTPS Traffic on Proxyman -> Select domain and enable SSL

  • Try to click the Fetch button again to see HTTPS Content on Proxyman. All done

If you still encounter SSL Error, it means your Android Studio doesn't recognize Proxyman Certificate yet.

Please Stop the app and Start again in Android Studio, then try again!

3. Sample Config

The following is the config that you can intercept HTTPS Traffic from

You're only able to see HTTPS content from the domain because it's hardcoded in the network-config.

In your real application, please make sure you've added all domains that you're going to intercept. Read more

  • AndroidManifest.xml

<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
  • res/xml/network_security_config.xml

<?xml version="1.0" encoding="utf-8"?>
<!--Set application-wide security config using base-config tag.-->
<!--Set domain-specific security config using domain-config tags. -->
<!--See for more information.-->
<!-- Trust user added CAs while debuggable only -->
<certificates src="system" />
<certificates src="user" />
<base-config cleartextTrafficPermitted="true">
<certificates src="system" />
<domain includeSubdomains="true"></domain>
<certificates src="user"/>
<certificates src="system"/>

4. Troubleshooting

Depend on Android Emulator and APIs version, you might encounter some errors.

1.After setting the Wifi Proxy in Android Studio, I could not visit

=> Please try to restart the Emulator and make sure the Wifi Status in Emulator is "Connected"

=> Delete your Android Emulator and create a new one

2. I get SSL Errors when intercepting HTTPS traffics

=> Sometimes, your Android Emulator doesn't load Proxyman Certificates => Please stop the project and start again.

=> Make sure your domains are listed in res/xml/network_security_config.xml

3. Android Device connection is often dropped and hardly connect

=> Try to add as a DNS on your current Mac Wifi.

Discussion at