Eclipse / Android - how to monitor device's HT

2019-07-20 15:30发布

I have my device connected to debug Android apps, but I need to see the HTTP requests and responses (inc. header info).

I've seen a similar question asked on how to do this for an emulator, but how to do this when a real device is connected?

1条回答
小情绪 Triste *
2楼-- · 2019-07-20 15:46

You can use Charles, is a really powerful tool that does exactly what you need.

Charles allows you to sniff the packets sent through HTTP from your actual device, the way you use it is simple:

  • Download and install Charles, run the program and specify the proxy port
  • Connect the Android Device to the very same network of the computer running Charles
  • Go to Wifi-Settings in Android Device and long tap on the network connected, then go to Modify Network-> Show advanced Options
  • Set Proxy as Manual and in Proxy Host name set your computer IP "192.xxx.x.x" and in the Proxy port add the same port specified in Charles Proxy Settings.

And that's it, all the traffic from your phone will be proxy to charles and it will show you headers, parameters, etc...

Hope it Helps

Regards!

查看更多
登录 后发表回答