Skip to main content

How can I listen the Android output (using sniffer)?



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


Comments

  1. This is something we frequently need to do at work. The method we used to solve it is as follows:


    Set 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

    ReplyDelete
  2. If your phone is rooted you can use Shark for Root on the Android Market.

    ReplyDelete

Post a Comment

Popular posts from this blog

Why is this Javascript much *slower* than its jQuery equivalent?

I have a HTML list of about 500 items and a "filter" box above it. I started by using jQuery to filter the list when I typed a letter (timing code added later): $('#filter').keyup( function() { var jqStart = (new Date).getTime(); var search = $(this).val().toLowerCase(); var $list = $('ul.ablist > li'); $list.each( function() { if ( $(this).text().toLowerCase().indexOf(search) === -1 ) $(this).hide(); else $(this).show(); } ); console.log('Time: ' + ((new Date).getTime() - jqStart)); } ); However, there was a couple of seconds delay after typing each letter (particularly the first letter). So I thought it may be slightly quicker if I used plain Javascript (I read recently that jQuery's each function is particularly slow). Here's my JS equivalent: document.getElementById('filter').addEventListener( 'keyup', function () { var jsStart = (new Date).getTime()...

Is it possible to have IF statement in an Echo statement in PHP

Thanks in advance. I did look at the other questions/answers that were similar and didn't find exactly what I was looking for. I'm trying to do this, am I on the right path? echo " <div id='tabs-".$match."'> <textarea id='".$match."' name='".$match."'>". if ($COLUMN_NAME === $match) { echo $FIELD_WITH_COLUMN_NAME; } else { } ."</textarea> <script type='text/javascript'> CKEDITOR.replace( '".$match."' ); </script> </div>"; I am getting the following error message in the browser: Parse error: syntax error, unexpected T_IF Please let me know if this is the right way to go about nesting an IF statement inside an echo. Thank you.