Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Referenced from
# Get the certification of the
echo -n | openssl s_client -connect | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/google.cer
# Navigate to the jre security directory insides the Android Studio
cd "/Applications/Android"
# Move the certification to current directory
mv ~/google.cer .
# Backup the cacerts file
cp cacerts cacerts-backup
# Import and trust the certification, note that the default password is "changeit"
keytool -keystore cacerts -importcert -alias google -file google.cer
# Now you can restart your Android Studio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment