Grab Bag Prep
1. Android phone requires root access first. A test method for root access: Install and open the Terminal emulator (available through the Android Market, etc.). In the terminal emulator interface input SU and enter, if the error indicates that the root, if the command prompt from the change # is rooted;
2. If the Android phone is not root, you can do root processing by superoneclick or other means (you need to install the Microsoft. NET Framework first). SuperOneClick Brush Root Access Tutorial: (http://soft.shouji.com.cn/news/501.shtml)
3. Need to get the Android SDK first
4. Need to obtain tcpdump software, get address (Http://www.strazzere.com/android/tcpdump)
Grab Package Steps
1. Connect your Android phone to your computer USB and open the Windows Command Prompt window
2. Copy the Tcpdump program to the Android phone (the directory file in front of the command is the local address, the latter directory is the destination mobile address)
C:\ANDROID-SDK-WINDOWS\PLATFORM-TOOLS>ADB Push C:/tcpdump/data/local/tcpdump
3. Modify permissions for Tcpdump
C:\ANDROID-SDK-WINDOWS\PLATFORM-TOOLS>ADB Shell
#chmod 777/data/local/tcpdump
4. Enter root permissions
C:\ANDROID-SDK-WINDOWS\PLATFORM-TOOLS>ADB Shell
$ su
After you run the SU command, the phone terminal desktop will be prompted to confirm your recognition of the root operation.
5. Run the tcpdump, and enter the following command to start the capture package.
/data/local/tcpdump-p-vv-s 0-w/sdcard/capture.pcap
6. Perform a packet-capture analysis on the mobile phone and execute the CTRL + C interrupt capture process at the Command prompt window after execution is completed.
7. Copy the capture results to local (the front directory is the phone-side address, and the back directory is the local address)
C:\ANDROID-SDK-WINDOWS\PLATFORM-TOOLS>ADB Pull/sdcard/capture.pcap c:/
8. Use Wireshark and other tools to view the capture package file Capture.pcap
Android system mobile phone-side grab packet method