Android – How to setup Android Lollipop emulator with Charles Proxy

androidandroid-5.0-lollipopandroid-emulatorcharles-proxyPROXY

I've been following instructions from other questions such as How to configure SSL certificates with Charles Web Proxy and the latest Android Emulator on Windows? (I'm on a MAC though) and SSL Proxy/Charles and Android trouble and I'm able to use Charles Proxy to analyze the packets of Android emulators all the way up to Kitkat.

Now I'm trying to do the same for Lollipop emulators. However, when I repeated the same steps I used to successfully setup the Kitkat emulators, Charles show nothing! When I try to connect to the web using the emulator's browser, it gives the following error:
enter image description here

Are there any special steps required for the Android Lollipop emulator on Mac OS X in order to enable packet sniffng?

Thanks in advance!

Best Answer

I had the same, and finally find a way out: Follow the instruction in the link you mentioned: How to configure SSL certificates with Charles Web Proxy and the latest Android Emulator on Windows?

Then from charles I went into the 'Proxy' menu and enabled 'Mac OS X proxy'. Than suddenly stuff came through. Even after I switched off the 'Mac OS X proxy'...

ps: setting the proxy through the mobile settings on the emulator did not work; proxy setting has to be done through the command-line (The emulator command in in the sdk/tools and should be run something like : ./emulator -avd Nexus_4_API_21 -http-proxy http://<your-ip-as-in-charles-help-menu>:8888). I've also tried some proxy-apps like the proximator without any succes. Also I've have problems and restarting charles fixed it.