1.Openssl安装
http://slproweb.com/products/Win32OpenSSL.html
exe下载安装后进行配置

新建系统变量OPENSSL_HOME,变量值设为(绝对路径)软件安装目录下的bin
直接浏览

编辑用户变量path,新建%OPENSSL_HOME%,最后点击确定

查看openssl版本,输入命令:openssl version
2.夜神模拟器安装
3.Charles安装
https://www.charlesproxy.com/latest-release/download.do
安装完成后进行 安装证书并导出

这里有个坑,选择下载目录后,需要在文件夹名后面加上"\xxx"才会把证书下载到该目录下的xxx.pem文件,否则的话证书会下载到上一级目录,而证书名就是最后一级目录的名称;

开启代理模式
点击Proxy > SSL Proxying Setting,勾选Enable SSL Proxying,添加代理域名/端口

证书格式化
前面介绍了如何安装openssl
1.查看哈希值:openssl x509 -subject_hash_old -in "My File.pem"
2.修改成对应的文件名,
注意后缀(.0):
ren "My File.pem" 326c9e5c.0

直接拖动进去,将证书复制到模拟器的目录:system/etc/security/cacerts/
4.来到windows本地的模拟器安装目录下
4.1查看连接状态:nox_adb.exe devices
4.2判断是否有root权限(默认开启):nox_adb.exe root
4.3进入shell:adb shell
4.4获取超级用户权限:su
4.5修改system目录读写权限:mount -o remount,rw /system
4.6开启证书权限:chmod 644 /system/etc/security/cacerts/326c9e5c.0
模拟器WiFi填入Charles代理的IP和端口


打开模拟器WiFi填入Charles代理的IP和端口 一直按住左边鼠标


搞定
