我怎么能听(使用嗅探器)Android的输出? [英] How can I listen the Android output (using sniffer)?

查看:106
本文介绍了我怎么能听(使用嗅探器)Android的输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了简单的应用,一些数据发送到我的服务器。

I wrote simple application that send some data to my server.

不知何故,数据被损坏,我想使用类似嗅探器在Android手机设备上看看究竟是我的应用程序发送数据。
当我与调试运行 - 我看到的数据是正确的 - 但在另一边(在服务器上),我看到数据被破坏。

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.

是否有某种方式来使用嗅探器将捕捉到从Android设备发送的数据包?

Is there some way to use sniffer that will catch the packets that are sent from the Android device?

我使用在服务器端Wireshark的 - 但它看起来像在Android侧面东西使问题。我需要在Android端以某种方式使用嗅探器

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:


  1. 设置了一台PC作为一个路由器(我们使用Linux,但任何可以作为路由器运行,并支持Wireshark的都行)。它需要两块网卡

  2. 一个网卡连接到您的Internet连接的网络。

  3. 连接其他的网卡,在一个单独的子网,WiFi接入点具有独特的SSID。

  4. 您的手机/平板电脑等连接到您创建的新的WIFI网络。

  5. 运行Wireshark的,从第二界面捕捉(到elimiate主网络上的任何流量)。

这允许我们使用了很多一个附加功能 - 您可以使用PC的网络系统,以降低网络性能(大多数Unix的可以做到这一点,这是相当简单的在Linux上),让您在测试应用程序的性能可怜的网络,如3G ...

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...

希望这有助于

这篇关于我怎么能听(使用嗅探器)Android的输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆