

You can run tcpdump in the background from an interactive shell or from Terminal. Sudo apt-get install wireshark # or ethereal, if you're still on dapper do whatever you want to capture, then ^C to stop it. # "-w": write packets to a file (rather than printing to stdout) # "-p": disable promiscuous mode (doesn't work anyway) # "-i any": listen on any network interface The typical procedure is to capture packets to a file and then examine the file on the desktop, as illustrated below:Īdb shell tcpdump -i any -p -s 0 -w /sdcard/capture.pcap You need to have root access on your device. If you want to build tcpdump by default, add CUSTOM_TARGETS += tcpdump to your buildspec.mk. Make snod # build a new system.img that includes itįlash the device as usual, for example, fastboot flashball. Mmm external/tcpdump # install the binary in out/./system/xbin If you are running your own build, execute: Running tcpdump Other network debugging commands Installing tcpdump Pushing the binary to an existing deviceĪdb push /wherever/you/put/tcpdump /system/xbin/tcpdumpĪdb shell chmod 6755 /data/local/tmp/tcpdump
