First, through the tcpdump grab bag
Introduction to the Android platform as an example tcpdump grab bag
1. Download Tcpdump First
2. Push the tcpdump to the phone
ADB push tcpdump/data/local
3. Modify Tcpdump Permissions
ADB Shell
chmod 777/data/local/tcpdump
4. Grab the packet directly from the ADB shell
Cd/data/local
./tcpdump-s -0-w/sdcard/tcpdump
5. Operation Phone , shortcut key CTRL + C can stop the package, will tcpdump open with Wireshark, analysis
Second, the computer to do Wi-Fi hotspot, mobile phone connected on the computer using the Wireshark grab bag "transfer from the network"
This method does not need root, and is suitable for all kinds of mobile phones (IOS, Android, etc.) with WiFi function. As long as the computer's wireless card has the wireless load-carrying function, you can. Here's how:
1. Make the computer network a hotspot
2. When the WiFi hotspot is turned on, the mobile phone is connected to the hotspot;
3. Start Wireshark, select the network card as the hotspot, click Start to grab the packet;
4. Operation mobile phone, can crawl to the phone all the network interaction with the packet, if need to stop, directly click on the Wireshark stop.
Third, use Fiddler to crawl
This method only adapts to crawling HTTP. The biggest advantage of this approach is that HTTP can be intercepted or received, and HTTP request and response data can be modified. Therefore, this method can be used to simulate some special scenarios (such as packet not responding, simulating some difficult error codes, etc.).
This method is best to have a computer with a wireless card.
1. Computer and mobile phone connected to the same LAN (such as computer and mobile phone connected to the same WiFi)
2. The computer opens Fiddler, under Fiddler, Tools-fiddler Options, set the listening port number under the Connections tab and tick "Allow remote computers connect", click "OK"
3. Mobile phone under the WiFi option, select * * for "manual", then the host name in the computer's IP address, the port number is filled in just set the "8888" after the save.
4. After the setup is complete, the direct operation of the phone can be seen on the computer's Fiddler on the HTTP code stream.
How to grab your phone