Timur helped me a lot with this.
Step 1.
You need to get the tcpdump binary from
here or
here.
If you want to know where this binary is from, refer to
Timur's post about cross-compilation.
If you don't want to bother, just download the tcpdump binary.
Step 2.
Install Android SDK in your machine.
See
here for details.
They have good support for Windows, Linux and Mac.
Step 3.
Go to android-sdk-linux_x86-1.1_r1/tools
or xxx/tools depending on which build version of android you are using.
run
"sudo ./adb push ./tcpdump-arm /data/local"
You can push the tcpdump binary from your computer to the phone's directory "/data/local".
According to Timur, we can remount the gphone and make other directory writable to user "shell", however, by default, I only found "/data/local" is writable to user "shell" (maybe wrong, but at least it works)
Step.
run "sudo ./adb kill-server"
run "sudo ./adb shell"
Now you have logined into Gphone's shell command
You can see this
"
* daemon not running. starting it now *
* daemon started successfully *
$
"
Run "su"
You will see
"#" and now you are in root mode.
(Our Gphone is a holiday version which is not for sale.
For normal GPhone, I guessed, you can not enter root mode, hence not be able to run "tcpdump". For GPhone Dev version, you can definitely enter root mode)
Run
"cd /data/local"
Run
"chmod 777 tcpdump-arm"
To change the binary executable
then
run
"./tcpdump-arm"
If you see
"tcpdump: no suitable device found"
Then it means that you need to be root to run tcpdump.
Have fun dumping traffic on your GPhone Adroid