[Q] Install trusted CA certificate on Android (HTC Vision / Desire Z / G2)

Search This thread

Muffix

New member
Dec 20, 2010
1
0
Hi there,

I have downloaded a root CA certificate and now I want to install it on my Android Froyo device (HTC Vision / Desire Z / G2), so that the device trusts the certificate and does not complain about an untrusted certificate every time I start an SSL connection.

Android stores CA certificates in its Java keystore in /system/etc/security/cacerts.bks. I copied the file to my computer, added my certificate using portecle 1.5 and pushed it back to the device.

Now, Android does not seem to reload the file automatically. I have read in several blog posts that I need to restart the device. Doing so results in the file being overwritten with the original one again.

My next try was to install the certificate from SD card by copying it and using the according option from the settings menu. The device tells me that the certificate has been installed, but apparently it does not trust the certificate. Moreover, when I try to copy the keystore to my computer, I still find the original stock cacerts.bks.

Is there any way to add my certificate to the trusted ones? What mechanism restores the original keystore on every boot? Can I reload the keystore without rebooting? This would be at least a preliminary solution. Is there a chance do do it programmatically?

Thanks in advance!