I wrote simple application that send some data to my server.
Somehow the data is corrupted and I want to use something like sniffer on the Android cellphone device to look what exactly is the data that my application is sending. When I run with debug - I see the data is right - but on the other side (on the server) I see that the data is corrupted.
Is there some way to use sniffer that will catch the packets that are sent from the Android device?
i using the wireshark on the server side - but its look like something in the android side is making the problem. I need to use sniffer somehow on the android side
This is something we frequently need to do at work. The method we used to solve it is as follows:
ReplyDeleteSet up a PC as a router (We use Linux but anything that can run as a router and supports wireshark will do). It needs TWO network cards
Connect one network card to your Internet connected network.
Connect the other network card, on a separate subnet, to a WIFI access point with a unique SSID.
Connect your phone/tablet etc to the new WIFI network you've created.
Run wireshark, capturing from the SECOND interface (to elimiate any traffic on your main network).
This allows one additional feature that we use a lot - You can use the network system of the PC to degrade the network performance (Most Unix's can do this, and it's quite straightforward on Linux) to allow you to test application performance on poor networks such as 3G...
Hope this helps
If your phone is rooted you can use Shark for Root on the Android Market.
ReplyDelete