How to get Android emulator working with Fiddler?

If you are trying to call web service within Android emulator, maybe you would like to see how your real HTTP request looks like and was sent to server. Of course there are a lot of ways to hook network interface such as using Wireshark, Microsoft Network Monitor,… However these tools provide low-level-interfaces with packet capturing which aren’t appropriate for TCP/IP data analyzing. Therefore, in this small blog post, I’ll summarize how to configure Fiddler so that he can capture all traffic going through Android emulator. Fiddler can parse JSON/XML format in readable form so that we can validate input/output data in HTTP request.

1. Fiddler can downloaded from http://www.fiddler2.com/fiddler2/version.asp . I’m on Windows 8 so I use Fiddler 4. You can choose appropriate version according to available .Net framework version at your computer.
2. Install Fiddler. Start Fiddler, go to Menu Tools -> Fiddler Options… -> Connections and set settings as image below

Fiddler Settings for Android Emulator

Important is that option “Allow remote computers to connect” must be enabled.

3. Restart Fiddler.

4. Start your Android Emulator. Go to Settings –> At Wireless & Networks section, choose More –> Mobile Networks –> Access Point Names –> Choose the default one (mine is TelKila) –> Set following options
– Proxy: your IP computer (type in cmd ipconfig to get your current IP address)
– Port: you get it from Fiddler settings above (default is 8888)
– Username: blank (remove anything which is available before, at my emulator there is a ‘*’ character)
– Password: blank.

Android Emulator Proxy settings

5. Save settings

Save Android Emulator Proxy Settings

6. Restart Emulator (turn off and start again).

7. In Emulator, start Browser and enter a URL address to check if Fiddler works. If you see your request appears in Fiddler that means your setup is successful.

Fiddler capture Android Emulator traffic

If it still doesn’t work, turn off Fiddler and Android Emulator. Start Fiddler again, then Android Emulator. Maybe you have to turn off your firewall also.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>