How to see all of the HTTP and SSL / HTTPS traffic of your smartphone

Sometimes it is interesting or maybe necessary to see which requests are running in the background while you are using your smartphone. This can be useful while you are writing a new application or when you want to ensure that some applications transfer their data secure.
1 answer

How to see all of the HTTP and SSL / HTTPS traffic of your Android smartphone

There are two ways to see the traffic of your phone.

The first one can only be used for Android versions 4.0 and higher.
First install a proxy application as Charles (http://www.charlesproxy.com/)
Then take your phone and navigate to the WIFI-Settings (settings->wi-fi). Make a long click on the connected network and select the "modify network" option. If you check the "show advanced options" you can scroll down a bit and see settings for proxy. Select the "manual" option and write the ip-address as proxy hostname and the port. If you are running Charles you can find the ip-address when navigating to Help->Local-Ip-Address.. The port for Charles is always 8888.
Save the settings and you are done. Now you see the whole traffic in the Charles-Session-Window. If you don't need the proxy anymore don't forget to remove it from the settings on your phone.

The second way is working for all Android versions.
First install a tool like Wireshark or Charles and use the proxy for your computer. Then use ethernet-connection and share the internet over wifi from your computer. Take your smartphone and select your shared wifi as the network.
And now you're done. You can see the whole traffic in your proxy-tool. The only disadvantages of this way are that you need an ethernet-connection and you see the traffic of your computer also.

Taggings: