I'm trying to pipe my android device's network traffic on wireshark, which is installed on my desktop. Terminal 1sudo ./adb shell "./data/local/tcpdump-armn -s 0 -v -w - | ./data/local/netcat -l -p 12345" This would allow me to route the data to port number 12345 on the android device. Terminal 2sudo ./adb forward tcp:12345 tcp:54321 && netcat 127.0.0.1 54321 | wireshark -k -S -i - This should allow me to send the data from port 12345 on the device to port 54321 on the desktop and then pipe it to wireshark. But, on execution I get asked 08 Oct '12, 02:49 Harshal Ksha... |
One Answer:
You cannot use netcat option -l and -p together. You should see an error message when running the above command. The following command works on my system, HOWEVER beware that netcat (the OS) might not buffer enough data if it's a busy network and it takes to long to start the command in terminal 2!
You better do this: Open a netcat server in terminal 2 (first!) and then send the output of tcpdump with netcat to that server. Terminal 2 (first!)
Terminal 1 (second!)
Replace x.x.x.x with the IP address of your Wireshark system. Regards answered 08 Oct '12, 11:35 Kurt Knochner ♦ |