Capturing Traffic from Genymotion Emulator

Capturing IP traffic from a Genymotion Android VM under windows is not trivial. The Genymotion virtual network adaptor communicates independently of the IP Stack of the host OS. Additionally network analyser packages running under windows such as Wireshark rely on WinPCAP library which attaches to the windows IP stack. (Also Loopback traffic doesn’t exercise the IP stack hence is not detected by packages such as Wireshark.)

The way to capture traffic is to configure an interception proxy on the Genymotion VM. This example will use fiddler as the proxy.

Configuring a Proxy on Genymotion

Select WIREDSSID from the Settings Menu

Click on WiredSSID and hold down for 2 seconds to get Modify Network Window

Select Modify Network then manually configure proxy. The IP address will be the IP address of the host machine

Port 8888 is the default proxy port for Fiddler and most other proxy software

Save this. Now all http traffic will be forced to the proxy where it can be intercepted.

Also by proxying to a physical address traffic is forced through the Hosts TCP/IP stack allowing packages such as Wireshark to capture traffic also.

Fiddler is a Http capture tool from Telerik and can be found at http://www.telerik.com/fiddler

To view the traffic in fiddler ensure that the “Allow remote computers to connect” option under Connections is selected

Now you will be able to see Requests from the Dalvik (Android VM) in fiddler. Enjoy debugging your awesome apps.

 

 

4 thoughts on “Capturing Traffic from Genymotion Emulator

  1. Dude you saved my life with this, I spent 1 day trying to figure out why my oauth was working on JS but not in android and later I found a typo thanks to be able to trace the network traffic of my genymotion device.
    Kudo to you!!

  2. But this analyzes traffic of only those apps which respect the android OS proxy settings. Some apps like WhatsApp by default send the traffic through default gateway rather than proxy.
    Any idea how that can be done?

Leave a Reply

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