0

I am working in a corporate network. In android emulator(OS v10 or 11) why I try to access any https secure site, It is giving Connection is not secure error (even for google.com).When I install android studio in my personal laptop, I am not facing the issue. What may be the issue?

Vinay
  • 1
  • 3

1 Answers1

2

I had the same problem at work

Your corporate network intercept your network activity by using a custom certificate to do it.

The computer have that certificate installed (probably by your corporate utility apps) so connections are trusted, but the emulator doesn't.

This is what you need to do in order for the emulator to trust that certificate.

  1. Download the corporate's custom certificate - open Chrome and browse to an external site (any external site, which is intercepted by your company, should work), then you need to click on the lock icon and download the root certificate of the chain.
  2. Use Android Studio or ADB to push the certificate to the emulator's file system.
  3. In the emulator, open system's security settings and install the CA certificate from device storage.

Enjoy :)

I'll improve my answer once I get home.


Update:

Here is how to export root CA certificate (important you export the root CA certificate, and not the host certificate):

Here is how to push file to Android emulator:

Here is how to install CA certificate on emulator:

Shlomi Katriel
  • 2,103
  • 1
  • 7
  • 20