zl程序教程

您现在的位置是:首页 >  后端

当前栏目

小米8安装charles证书方法

安装方法 证书 小米 Charles
2023-09-27 14:25:19 时间

https://blog.csdn.net/qq_40582463/article/details/86933720

 

问题描述

通过自带的浏览器打开chls.pro/ssl下载证书文件,无法安装,提示“没有可安装的证书”。

原因

是因为小米手机默认开启了迅雷下载引擎,导致下载的证书文件内容不正确,所以无法安装。

错误的证书文件内容错误的证书文件内容 正确的证书文件内容正确的证书文件内容

解决办法

在【下载管理】中关闭迅雷引擎重新下载证书,安装即可。

2

 

4

注意事项

经过测试,在【下载管理】中直接点击打开,即使证书格式正确也无法安装,如下图。遇到这种情况可以在【文件管理器】中Download目录下找到该文件,点击安装

今天用charles抓包,忽然发现很多https抓不到了,显示为unknown,安装了证书也不管用。看到官网有这样一段话,大概的意思就是从安卓7往后,只能抓自己的app的数据包了:

As of Android N, you need to add configuration to your app in order to have it trust the SSL certificates generated by Charles SSL Proxying. This means that you can only use SSL Proxying with apps that you control.

In order to configure your app to trust Charles, you need to add a Network Security Configuration File to your app. This file can override the system default, enabling your app to trust user installed CA certificates (e.g. the Charles Root Certificate). You can specify that this only applies in debug builds of your application, so that production builds use the default trust profile.