Article directory
-
- 【Introduction】
- 1. Tool preparation:
- Two, Charles settings
- 3. Thunderbolt simulator network configuration (update: Thunderbolt 9.0 and above do not need to set this step)
- 4. Turn on the global agent (update: the software above Thunderbolt 9.0 does not need to be installed and set up)
- 5. Check whether the packet capture is successful
【Introduction】
Why can’t capture packets when using a high-version emulator? Because Android 7.0 and above no longer trust the user certificate directory, you need to install the certificate to the system certificate, and you need to be root when installing.
1. Tool preparation:
Certificate installation tool + global proxy tool download:
https://download.csdn.net/download/weixin_51111267/87536481
Two, Charles settings
(1) Certificate installation on the computer
(2) Install the system certificate on the Android emulator (RooT permission is turned on)
1. Save the certificate to the computer first, then drag and drop it into the simulator
After saving successfully, you can find the certificate in the folder
2. Drag and drop into the Thunderbolt Simulator to install the certificate, double-click to install according to the steps, and the certificate can be named casually
3. Copy the installed certificate file (xxx.0) to the system certificate installation directory by using the Solid Explorer tool (included in the above resource package)
Find the personal certificate installation directory: root directory>data>misc>user>0>cacerts-added
Open the system certificate installation directory: root directory>system>etc>security>cacerts
The certificate installation is complete!
(3) Charles' proxy port settings and allow SLL settings
1. Port settings
2. Allow SLL settings
3. Thunderbolt simulator network configuration (update: Thunderbolt 9.0 and above do not need to set this step)
The ip setting is on the same network segment as the host, for example, the host address is 172.16.0.166, and the simulator ip address is configured as 172.16.0.165
The settings in the WiFi are the same as the host ip address, and the port depends on the http proxy settings of Charles.
4. Turn on the global agent (update: the software above Thunderbolt 9.0 does not need to be installed and set up)
Use the proxyDriod tool (the above resource package has it), the ip configuration is the same as that of the host, and the port sees the Socks5 port setting of Charles
5. Check whether the packet capture is successful
The request packet can be received, if the request packet is not <unknown>, it is successful!
if <unknown>
①The certificate was not installed successfully! [Android 7.0 and above no longer trust user certificates, you need to install system certificates, and you need to be root when installing]
②Set the access rights of the emulator ip and computer ip, see below