lupohan44 / TrustUserCertificates

GNU Affero General Public License v3.0
54 stars 5 forks source link

Custom Folder for User Certificates #1

Closed Forgotten2411 closed 4 months ago

Forgotten2411 commented 5 months ago

Hi, i tried installing certificate using custom folder method but not working after few reboots. Need to add certs manually then it will shown as system certificate.

lupohan44 commented 4 months ago

What do you mean not working after few reboots?

Forgotten2411 commented 4 months ago
  1. (Optional) create a file named /data/adb/trustusercerts/no_user_cert and put certificates into /data/adb/trustusercerts/certificates - This step will make module using certificates from this folder instead of user certificates

I followed these step as above, but it won't installs as system certs.

lupohan44 commented 4 months ago

May I know the naming of your certificates in /data/adb/trustusercerts/certificates?

Forgotten2411 commented 4 months ago

May I know the naming of your certificates in /data/adb/trustusercerts/certificates?

Sure. Please see attached photo. Thanks. I don't know if i'm doing it the right way, but it doesn't shows up in system certs. IMG_20240220_230002

lupohan44 commented 4 months ago

Your filename is inccorrect. Please refer to this https://medium.com/hackers-secrets/adding-a-certificate-to-android-system-trust-store-ae8ca3519a85

openssl x509 -inform PEM -subject_hash_old -in | head -1 mv .0

The filename should be the hash of the certificate. There is another easy way to do this, you can install certificate as user certificate, and you should find the renamed certificate in folder /data/misc/user/0/cacerts-added, copy it to custom folder