I'm trying to capture https requests from the Android emulator (qemu from Android Studio) running on my dev machine. I've launched the emulator with the command line option -http-proxy localhost:8888 so as to point to Fiddler running on the machine, and I've copied the Fiddler root cert to the virtual SD card and installed it. http traffic is captured perfectly, but all https requests fail and show in Fiddler as:
HTTP Tunnel to (dest IP address here)
Request:
CONNECT (dest IP address here):443 HTTP/1.1
Host: (dest IP address here):443
Response:
HTTP/1.1 200 Connection Established
FiddlerGateway: Direct
StartTime: 10:39:08.556
Connection: close
I'd read elsewhere about installing the root cert by going to http://ipv4.fiddler:8888/FiddlerRoot.cer in the browser, but this fails:
HTTP/1.1 405 Method Not Allowed
Date: Wed, 17 Aug 2016 09:43:14 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Cache-Control: no-cache, must-revalidate
Timestamp: 10:43:14.490
This endpoint does not support HTTP CONNECTs. Try GET or POST instead.
I get the same response when attempting to use the host IP address instead of ipv4.fiddler. I also can't get the Fiddler Echo Service page in the emulator browser, but it works fine in the host's browser.
I'd be really grateful if someone could point out just where I'm going wrong here, I'm starting to run out of ideas!