小米安卓7以上系统HTTPS抓包
0. 备份手机数据
建议使用小米云服务的云备份
1. 刷开发版系统
https://www.miui.com/download.html
2. 解锁
http://www.miui.com/unlock/index.html
3. 开启ROOT权限
设置 > 应用设置 > 授权管理 > ROOT权限管理
4.安装adb
brew cask install android-platform-tools #mac
windows: https://adbshell.com/downloads
5.解锁System分区
adb root
adb disable-verity # 重启手机
6.安装证书
保存证书到电脑 (例: charles-ssl-proxying-certificate.pem)
openssl x509 -inform PEM -subject_hash_old -in charles-ssl-proxying-certificate.pem | head -1 #记下输出的一段字符,下文替换 (例: 06e9d810)
cat charles-ssl-proxying-certificate.pem > 06e9d810.0
adb connect 192.168.199.xxx:5555
adb root
adb remount # 如果失败,执行 adb disable-verity 重启
adb push 06e9d810.0 /system/etc/security/cacerts/06e9d810.0
问题:
adb connect
时,如果遇到failed to connect to '192.168.199.xxx:5555': Connection refused
,安卓安装APP "WIFI ADB by MetaCtrl" 谷歌商店安装 OR https://apkpremier.com/download/com-ttxapps-wifiadb