![]() ![]() # In a separate shell, forward data and run ethereal.Īdb forward tcp:11233 tcp:11233 & nc 127.0.0.1 11233 | ethereal -k -S -i. You can also monitor packets with wireshark or ethereal, as shown below:Īdb shell "tcpdump -n -s 0 -w - | nc -l -p 11233" For example, if you want to see HTTP traffic: s 0 captures the entire packet rather than just the header): Real time packet monitoringĮxecute the following if you would like to watch packets go by rather than capturing them to a file ( -n skips DNS lookups. If you prefer, add an expression like port 80 to the tcpdump command line. ![]() By default, tcpdump captures all traffic without filtering. 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 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |