5

Here is a link to the emulator announcement (included with Visual Studio 15 CTP): https://www.visualstudio.com/en-us/msft-android-emulator-vs.aspx

I would like to set up a proxy for the Internet connection in this VM. My purpose is to connect through port 8888 on my host machine so that I could see this Android VM's traffic in my Fiddler.

Is this possible? The android settings in the VM itself do not contain any mobile network access points and therefore I can't figure out how to set up a proxy.

Thanks in advance.

Lev Dubinets
  • 788
  • 10
  • 32

3 Answers3

2

Unfortunately it's not possible to monitor network traffic on the VS Emulator for Android yet. This is because we treat the network connection as an Ethernet connection, and you can only set a proxy on a WiFi network adapter in Android. It doesn't even work when you try to manually set the System.HTTP_PROXY variable via a Java System.putString() call, because Android only gives this permission to system apps. We're working on a fix for this and it should be available soon!

John Engel-Kemnetz
  • 2,527
  • 22
  • 22
2

We've made this work as of Visual Studio 2015 RC. See http://blogs.msdn.com/b/visualstudioalm/archive/2015/05/06/using-fiddler-to-monitor-network-traffic-from-the-vs-emulator-for-android.aspx for the full instructions.

John Engel-Kemnetz
  • 2,527
  • 22
  • 22
  • Follow the full instruction and it works. One thing to note is "**The IP Address**" of the proxy server must be used, and "The Host Name" will not work. It took me a while to figure that out since the hint is actually requesting "Proxy Hostname". – Lawrence Teo May 09 '16 at 02:30
1

Once you have launched the emulator follow the steps below.

  • Settings
  • WI-FI
  • Long tap on network you are connected to and select Modify network config
  • Check the Show advanced options checkbox
  • Lastly change the proxy settings

Hope this works for you.

Kevin Crain
  • 1,905
  • 1
  • 19
  • 28
  • Have you tried this? The issue is that the VS Emulator for Android is connected to host's internet via "ethernet". There are no Wi-Fi networks listed in settings on the emulator. – Lev Dubinets Mar 31 '15 at 20:39
  • Why don't you post that as an answer, I have not used the android emulator for VS yet, was aiming for a hopeful prospect that it would help/work. – Kevin Crain Apr 01 '15 at 06:29
  • I'm not sure what you are suggesting. I don't have an answer, I am still looking for a way to proxy the VS Emulator for Android through Fiddler. I clarified that there are no wifi settings on the emulator so your method does not work – Lev Dubinets Apr 02 '15 at 07:06
  • Okay when I get home I will test as I just recently got VS again on my desktop at home, the emulator should automatically use pc wifi without any configurations, and to turn on a proxy you would just turn it on from your I.E. browser settings, as thats the proxy settings Visual Studio will use. – Kevin Crain Apr 02 '15 at 08:28