Capture the Network Package of your mobile phone.ProgramMany times. But the path to packet capture is not that smooth.
Mobile Network Packet Capture requires three tools:
1. ADB: Generally obtained from the android SDK
2. Root tool: psneuter. We can send attachments from many places as we are honest people. /Files/taofh/psneuter.zip
3. tcpdump: network packet capture tool. You can download the attachment (download and remove the suffix .txt. The problem is that only files with a specific suffix can be uploaded here, so I have to add a suffix ". txt"):/files/taofh/tcpdump.txt
To capture packets, follow these steps.
1. Get the root permission:
Use psneuter. Actually, there are four steps.
Step 1: Decompress psneuter.zip
Step 2: copy the extracted psneuter to your mobile phone. Generally, use/data/local/tmp. Of course, it can also be sdcard, depending on your needs.
Step 3: add operation permissions for psneuter. It is easy to use chmod 777. If you want to know the specific chmod authorization method, you can view the Linux manual. 777 is the maximum permission and the least security permission, but it doesn't matter.
Step 4: Run psneuter to obtain the root permission
The following is an exampleCode:
ADB push <locally decompressed psneuter>/data/local/tmp/
ADB Shell
$ Chmod777/Data/local/tmp/psneuter
$/Data/local/tmp/psneuter
$ Exit
ADB Shell
#
2. Packet Capture: it is easier to capture packets.
Step 1: Copy tcpdump to your mobile phone
Step 2: authorize chmod 777 to tcpdump <file path/tcpdump>
Step 3: Use tcpdump to capture packets and view the package content
The following is the sample code:
ADB push <tcpdump>/data/local/tmp
ADB Shell
# Chmod 777 /Data/local/tmp/tcpdump
#/Data/local/tmp/tcpdump-a-n-s 1024
OK. We can analyze the captured package.