How to sniff HTTPS traffic from Android emulator to remote server ? How to sniff HTTPS traffic from Android emulator to remote server ? android android

How to sniff HTTPS traffic from Android emulator to remote server ?


The easiest way to do this is to use CharlesProxy to proxy your device or emulator traffic for you. The only extra step you need to do is to install the CharlesProxy SSL certificate on your device/emulator which is very straight forward:

Download the certificate from Charles Proxy (it's in their help menu) and place it on your device, then install via security settings on your device.

You then configure your device or emulators network connection to use a manual proxy and set it to the Charles Proxy address and port. Enable SSL proxying and your SSL connections will be securely routed end-to-end via Charles and Charles will be able to show you the content of requests and responses in the clear.


I'm using WireShark for sniffing, it allow you to monitor and filter raw data. But because you using https and all transactions encrypted i suppose it can't help you. May be you can switch from https to http for debug, and later when all will be works fine change protocol back to https


Do you mean you can't see the traffic at all or do you get it encrypted? Is this a web application or native application? which Android version are you using? phone or emulator?

Normally, if you set up the proxy properly, you will get the traffic, but encrypted so you can't read it. In order to see the actual content in Fiddler you would need your device to trust Fiddler's root certificate (used to create fake certificates on the fly). See this:

http://www.fiddler2.com/fiddler/help/httpsdecryption.asp

Unfortunately, I have not found a way to add root certificates to an android device other than rooting it and replacing the certificate store (like this)