4

I have a Samsung Galaxy S, running on Android 2.2 I want to track all HTTP requests (from both browsers AND apps) with Charles (proxy installed on my computer).

I would like it similar to how it is on the iPhone where you go to settings, wifi, and on the right connection you can select the HTTP proxy settings

6 Answers 6

4

You can do it with Wireshark: http://www.wireshark.org/download.html

Here are instructions for Mac + Android device:

Launch Terminal and run the following commands:

cd /dev
sudo chmod a+r bpf*

Connect to the internet using an Ethernet cable

Click on the Airport/Wi-Fi icon at the top right of the screen and select Create Network; remember the name you give this network

Go to System Preferences, open the Sharing pane, highlight (but don’t check) Internet Sharing

Select Share connection from: Ethernet, To computers using: check AirPort/Wi-Fi

Click AirPort/Wi-Fi Options, and enter the network name you chose above (it should be displayed automatically, so just click OK)

Check the Internet Sharing box

Click Start

Connect your Android device to the network you just created

Launch Wireshark

From the menu, select Capture -> Interfaces. Click on Options next to en1 (or whichever one shows a Wi-Fi icon)

Click the Capture Filter: button

If you want, choose one of the filters, such as HTTP TCP Port (80) and click OK

Click Start

1
  • 1
    How to run the same on windows 7? Feb 5, 2013 at 6:57
2

There is currently no out-of-the box proxy in Android. Several alternatives are discussed in this page. Also google for "Android proxy" to see what other alternatives are out there.

4
  • thanks, i tried the apps listed in that page but they are not working properly on my phone. do you see any other way to 'listen' to all HTTP requests sent/received on my phone ?
    – Matthieu
    Apr 6, 2011 at 11:55
  • Not that I know of. Any app could open a socket and send an HTTP request to a server on their own. To my knowledge, there is no way to intercept messages going out a socket that another app opened. Apr 6, 2011 at 11:58
  • Google just marked issue 1273 (code.google.com/p/android/issues/detail?id=1273) as "fixed in 3.0", which is for tablets. Still, the is hope that the phones will get it one day... Jun 17, 2011 at 22:47
  • I can confirm that 4.0 has proxying out of the box. I just set up a proxy through a computer on my network for my Samsung Galaxy Nexus (running ICS) Sep 19, 2012 at 14:10
0

ProxySelector

1
  • Thanks, but I would like to connect to a proxy, not create a new one or program an access. Is there a way to do it easily (on iPhone for example, you go to settings, wifi, and on the right connection you can select the proxy settings)
    – Matthieu
    Apr 6, 2011 at 11:39
0

Some alternatives to have partial support of proxy in Android are listed here: http://issue1273.blogspot.com. There is also an Android Proxy Library that try to abstract the access to proxy settings for every Android version.

0

A very nice write up on the procedure for setting up Charles with Android can be found here, including installing the certificate so you can also debug / proxy your SSL traffic:

http://jaanus.com/post/17476995356/debugging-http-on-an-android-phone-or-tablet-with

0
0

Since Android Studio 3.0 release, android now support setting proxy natively. See documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.