When developing a small Xamarin forms app I wanted the android emulator to connect to an intranet identity provider. That didn’t work. The id server was using an SSL certificate issued by an untrusted CA. Here’s what I did to get it working.
Andy Android Emulator for Mac. Andy is a high-end Android Emulator. It’s a powerful as well as a heavy Android Emulator designed for Mac and PC. Andy Emulator comes as a package installer with many apps. It works on a separate Virtual Machine, so the installer file will be much high compared to other Android Emulators. Backup & Restore Android as Android Backup Software. It’s easy to backup Android data to Windows PC or Mac with the help of this powerful PC suite for Android, 9 types of data on Android phones and tablets can be backed up to Windows or Mac computer with only 1 click.
First, you will need the CA certificate so android can trust the SSL cert. If you don’t have the cert, you can export it using Chrome on mac or Chrome on windows:
Exporting certificate using chrome
Rooted Android Emulator Macro
Next, push the .cer to the emulator using adb push command. Note that even though I’m pushing the cert to the sdcard it actually shows in a different location. I’m not sure why my emulator is doing that but I’ve seen others that work just fine. Just make sure to search in all folders when installing the cert in the emulator.
Before installing the certificate, you will need to enable device lockscreen security. Finally, install the certificate using Settings app:
Importing certificate to Android Emulator
After import, you can check your certs in User credentials under Encryption & credentials and more importantly, navigate to the SSL site without errors.
Droid4x
Rooted Android Emulator Mac M1
Cheers!