I want to capture all the traffic from the emulated device by the Fiddler app on the host machine. After all my tries, I ended up with the infinite number of timed-out CONNECT requests even on HTTP (non HTTPS) requests.
What I did:
Android Emulator proxy setup:
Fiddler setup:
Added the following lines to the host machine hosts file: 127.0.0.1 local.test and to the Android device hosts file: 10.0.2.2 local.test. This is done to 1) prevent Chrome to force switching to HTTPS 2) point this name to correct IP addresses as it's different on the host machine and on the Android system.
Converted FiddlerRoot certificate from the DER format to PEM (begins with the BEGIN CERTIFICATE line) and stored it to the phone file system: /system/etc/security/cacerts/c8450d0d.0 with correct rights:
Additions to Android were made using the Google-API image (Android 9) with the writable file system.
This root certificate appears in the system root certificates list:
FiddlerRoot certificate also successfully installed on the host machine and decrypts HTTPS traffic with no problems:
In the result:
When I turn off proxy in the android emulator, I can access a local app using the custom domain name local.test:3200. I also can access internet sites with no problems.
When I turn on proxy in the android emulator, I see a lot of CONNECT requests that all times out:
When I try to access my local HTTP app http://local.test:3200 I receive the HTTPS CONNECT request to the specified port:
Why it tries to connect by HTTPS to the port 3200??? This issue only happens when the Android Emulator proxy is turned on. When turned off, I can successfully access my local page by HTTP. Is it the emulator app that tries to switch to HTTPS? Or what I'm doing wrong?
Currently, I can't capture and decode any traffic from the emulated device. Could anyone help me, please?







