Issue
Is there a way to install CA certificate (.crt
file) under the Security -> Trusted Credential -> User tab
via ADB? or any other "scriptable" way.
Solution
I figured out a way to do this, thus i was able to trust charles proxy certificate. it will be added as trusted SSL root certificate.
First you need to get the certificate hash
openssl x509 -inform PEM -subject_hash_old -in charles-proxy-ssl-proxying-certificate.pem | head -1>toto
i use windows, store it in a var in a matter to automate the process set /p totoVar=<toto
set totoVar=%totoVar%.0 && DEL toto
cat charles-proxy-ssl-proxying-certificate.pem > %totoVar%
openssl x509 -inform PEM -text -in charles-proxy-ssl-proxying-certificate.pem -out nul >> %totoVar%
adb shell mount -o rw,remount,rw /system
adb push %totoVar% /system/etc/security/cacerts/
adb shell mount -o ro,remount,ro /system
adb reboot
Answered By - Incepter
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.