Telerik blogs
TW_870x220

In this step by step tutorial, learn how to setup your Аndroid device to use Fiddler as a proxy and capture web traffic from your phone.

Debugging web applications on Windows is fairly easy. Every browser has its own developer tools, and most importantly you can use Fiddler. However, this is not the case if you’re mobile developer that want to debug an application or website from Android device. Luckily, you can still use Fiddler to do it.

Want to learn more about using Fiddler to debug Android apps? Check out our webinar on mobile app debugging with Fiddler!

Prerequisites

First you have to have Fiddler installed on your desktop machine. The PC and the Android device should be discoverable on the same network. This was the tricky part for me, as even when I have them on the same network, they couldn’t communicate with each other. I had to use the mobile hotspot on my machine to make them discoverable.

Just ping the device IP from your machine to be sure they can communicate.

Setting up Fiddler

First, you should enable the Allow remote computers to connect setting in Fiddler

  1. Open Fiddler and select Tools -> Options
  2. Choose the Connections tab
  3. Select the Allow remote computers to connect checkbox to enable the setting
  4. Restart Fiddler in order the changes to take effect

Fiddler is now listening on port 8888 (this is the default port, you can change it from the setting above).

Allow remote computers to connect

Setting up the Android Device

Once Fiddler is listening, we should use it as a proxy in Android.

  1. Open the WiFi menu.
  2. Tap and hold on your current network to show the network details
  3. Choose the Manage network settings option
  4. Check Show advanced options checkbox
  5. Choose Manual from the Proxy dropdown list
  6. Type your IP address in the Proxy host name field
    NOTE: You can check your IP address by hovering over the Network Connection icon in the Fiddler toolbar.
  7. Type the Fiddler listening port (8888 by default) in the Proxy port field
  8. Click Save to apply changes

WiFi settings

Your device’s traffic should be visible in Fiddler.

Capture HTTPS Traffic

With the current setup you should be able to capture HTTP traffic. However, if you try to open any HTTPS website, you’ll get the This site’s security certificate is not trusted! error. To fix this, you should trust the Fiddler root certificate.

NOTE: By default, Fiddler-generated certificate is valid for 5 years. However, this can cause ERR_CERT_VALIDITY_TOO_LONG error in Chrome on Android. To fix this:

  1. Run about:config in Fiddler QuickExec.
  2. Create new variable fiddler.certmaker.ValidDays with value 820

Then, you can proceed with installing the Fiddler Root certificate as follow:

  1. In your browser, navigate to http://ipv4.fiddler:8888
  2. Download the Fiddler root certificate.
  3. Install the certificate on your device.

Now you should be able to capture HTTPS traffic too.

Cleaning Up

Once you’re done debugging, don’t forget to remove the WiFi proxy from your device.

This is all you need to know about capturing web traffic from Android devices with Fiddler. If you have any questions or problems, just leave a comment below.

We always love hearing feedback, so feel free to share your thoughts on what you'd like to see with us over on our Feedback Portal. And if you're new to Fiddler, you can get started today - download Fiddler for free right here


Kamen Velikov
About the Author

Kamen Velikov

Kamen is software developer and manager of the Fiddler team at Progress. He has more than 11 years of professional experience in software development. Programming has always been his passion and he feels lucky to work his hobby. In his free time, he enjoys traveling, motorcycling, freshly-roasted coffee, and trying new experiences. Geek by design. Writing is a new thing to him and he’ll appreciate your feedback and comments. 

Related Posts

Comments

Comments are disabled in preview mode.