使用Charles抓取APP https请求

说明

常见的抓包工具对于抓http请求没有任何问题,也很方便,只需要在电脑开启代理,手机wifi代理设置为电脑IP以及代理端口即可。但是想要抓https包就不那么简单了,为了能够正确抓到包,需要处理一系列证书问题,安装证书又涉及到Android版本的问题、root问题等,让这件事情变得困难重重,但是这一切都可以通过模拟器来实现。

解决方案

该方法是MuMu模拟器发布在官网的教程,可按照此方法进行配置即可正确抓到https的请求。
具体请看:https://mumu.163.com/help/20240814/40912_1174291.html

注意点:

1、charles破解参考 https://www.cnblogs.com/hahaniuer/p/17915980.html

2、adb root出现如下错误:

C:\platform-tools>adb root
adb: unable to connect for root: more than one device/emulator

原因:说明你的电脑当前连接了多个设备或模拟器,ADB 不知道要把命令发给哪一个设备。
查看当前连接了哪些设备:

C:\platform-tools>adb devices
List of devices attached
127.0.0.1:7555  device
emulator-5554   device

连接时加上 -s 设备名, 如 -s 127.0.0.1:7555

所以导入证书步骤为如下:

adb devices
adb kill-server
adb connect 127.0.0.1:7555
adb -s 127.0.0.1:7555 root
adb -s 127.0.0.1:7555 connect 127.0.0.1:7555
adb -s 127.0.0.1:7555 push a61528e4.0 /system/etc/security/cacerts
adb -s 127.0.0.1:7555 shell "chmod 664 /system/etc/security/cacerts/a61528e4.0"

版权声明:
作者:admin
链接:https://chenxie.net/archives/2776.html
来源:蜀小陈
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>
文章目录
关闭
目 录