Using tcpdump to grab a bag
1. To the phone root, a lot of ways
2. Installing ADROID-SDK
3. Enter the command: adb version, if the versions of ADB are displayed normally, the previous environment variable setting is not a problem, and the Adb.exe itself is complete, it is possible that the Adb.exe itself is corrupt, the environment variable is set incorrectly, Or the environment variable has not been set in effect, please check it yourself
If an environment variable is not configured, you can enter the ADB installation directory platform-tools the command
4. Download tcpdump Copy to/data/local/directory
Push prompt protocol failure, check data said USB interface power supply, switch to the back end of the USB port can be
If the copy fails and it is possible that the permissions are not correct, give the file directory all permissions
5. Use tcpdump to grab the packet and write the result to a pcap file to save, 2-5.
- Use the command su command in the Command Prompt window to get administrator privileges;
- Enter the command in the current shell: /data/local/tcpdump-p-S 0-w/sdcard/001.pcap;
- On the Android phone to do related operations, generate communication packets, the communication behavior after the completion of the command Prompt window with the Ctrl + C key combination to exit the current shell to stop grasping the package.
In the above procedure ,theparameters of the tcpdump command have the following meanings:
# "-P": Disable promiscuous mode (does not use promiscuous mode)
# "-S 0": Capture the entire packet (-s parameter to specify the packet capture length, specified here as 0, meaning to crawl the complete packet)
# "-W *.pcap": Write packets to a file (writes the result to a pcap file instead of displaying directly on the terminal)
4. Download the capture results to your local PC. To use commands in a command prompt window: adb pull/sdcard/001.pcap <LocalPath of Pcapfile >
5. Use the Wireshark and other protocol analysis tools to view the results of the capture package.
Record the first time to grab the bag under Android