1. 安装charles的证书到手机

  2. 在电脑上运行命令:openssl x509 -subject_hash_old -in ysnows.pem

  3. 复制用户证书到系统证书目录:

     charles: cp /data/misc/user/0/cacerts-added/5379f4e5.0 /etc/security/cacerts/5379f4e5.0
        
     whistle: cp /data/misc/user/0/cacerts-added/28578df1.0 /etc/security/cacerts/28578df1.0
    
  4. 开始抓包

参考:Android 7.0(荣耀8) charles不能抓https包问题解决