First, through the tcpdump grab bag
Introduction to the Android platform as an example tcpdump grab bag
Download Tcpdump First
Push tcpdump to Mobile: adb push tcpdump/data/local
Modify tcpdump permissions: adb shell chmod 777/data/local/tcpdump
Operation phone, shortcut key CTRL + C can stop the package, will tcpdump open with Wireshark, analysis
Second, the computer to do WiFi hotspot, mobile phone connected on the computer using Wireshark grab Bag
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:
Make a computer network a hotspot
When the WiFi hotspot is turned on, the phone being tested is connected to the hotspot;
Start Wireshark, select the network card as the hotspot, click Start to grab the packet;
Operation of the mobile phone, you 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.
PC and phone connected to the same LAN (e.g. PC and phone connected to the same WiFi)
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"
Mobile phone under the WiFi option, select * * for "manual", and then the host name to fill in the computer's IP address, the port number is filled in just set the "8888" after the save.
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 a bag by mobile phone