Tuesday, November 27, 2012

android tcpdump problem: got0 or 0 packets captured

After you get the root access of your android phone and download the tcpdump binary file to your phone, it's time to try. While many instructments only shows the command below :
"./tcpdump -s 0 -v -w out.pcap"
For me, this command never worked, the bash always show
"got 0" or "0 packets received"
The reason is I didn't setup the right network interface to monitor. We can use netcfg to list all the network interfaces and find the one with the right ip address as our target. So the right command should be like this:
"tcpdump -i rmnet1 -p -s 0 -w out.pcap "