androidandroid-emulatorssl-certificatecharles-proxy

Install CA Certificate on android emulator


I am using an android emulator (Pixel_3a_API_32_arm64-v8a) and need to install Charles Proxy there. As per the step I have already set up the wifi settings(i.e change proxy to manual and then set up the proxy hostname and proxy port in the wifi setting). Also, I have downloaded the SSL certificate using http://chls.pro/ssl. But on trying to install it I am getting an error in my android emulator.

Error

This certificate from null must be installed in Settings. Only install CA certificates from organizations you trust.

Solution

  • On recent Android versions, it's no longer possible to install system certificates, and installing user certificates is much harder. It's not possible to just open the file normally to install it, and apps can't show you any prompts to trigger installation either.

    For more details on the change and how this works, see https://httptoolkit.com/blog/android-11-trust-ca-certificates/

    The actual steps you need are: