转载自网络。
保存证书
把证书(.pem格式)导出到本地路径,名称为charles.pem, 并到该路径打开cmd
openssl x509 -inform PEM -subject_hash_old -in cacert.pem
rn charles.pem ea22023f.0
adb连接夜神模拟器
adb connect 127.0.0.1:62001
安装根证书文件
adb root
adb remount
adb push ea22023f.0 /sdcard/
adb shell
su
mount -o rw,remount /system
mv /sdcard/ea22023f.0 /system/etc/security/cacerts/
chmod 644 /system/etc/security/cacerts/ea22023f.0