I figured out a way to do this, so I was able to trust the charles proxy certificate. it will be added as a trusted root SSL certificate.
First you need to get a certificate hash
openssl x509 -inform PEM -subject_hash_old -in charles-proxy-ssl-proxying-certificate.pem | head -1>toto
I use windows, save them in var variable 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
source
share