lupohan44 / TrustUserCertificates

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

User Certificate Deletion, also Deletes System Certificate #2

Closed redsky1991 closed 1 month ago

redsky1991 commented 1 month ago

Thanks, very well done. It works for me after I did the following (running Android 14 Galaxy S23)

  1. created directory /data/adb/trustusercerts/no_user_cert
  2. created directory /data/adb/trustusercerts/certificates
  3. Placed my certificate in the directory /data/adb/trustusercerts/certificates
  4. At the this point my certificate has not yet been added even after manual reboot
  5. Installed the user certificate via the installer within the android settings
  6. Restarted, the certificated shows in system but also in user
  7. Removing the user certificate via andorid settings also removes the system certificate at the same time.

Is there a way to keep only the system certificate while deleting the user certificate? Keeping both is interfering what I'm trying to achieve.

Thanks

lupohan44 commented 1 month ago

Thanks, very well done. It works for me after I did the following (running Android 14 Galaxy S23)

  1. created directory /data/adb/trustusercerts/no_user_cert
  2. created directory /data/adb/trustusercerts/certificates
  3. Placed my certificate in the directory /data/adb/trustusercerts/certificates
  4. At the this point my certificate has not yet been added even after manual reboot
  5. Installed the user certificate via the installer within the android settings
  6. Restarted, the certificated shows in system but also in user
  7. Removing the user certificate via andorid settings also removes the system certificate at the same time.

Is there a way to keep only the system certificate while deleting the user certificate? Keeping both is interfering what I'm trying to achieve.

Thanks

  1. created directory /data/adb/trustusercerts/no_user_cert

This should be a file, not a directory

  1. Placed my certificate in the directory /data/adb/trustusercerts/certificates

You need to place the certificates following Android's naming rule: 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

As I mentioned in #1