21

Is it possible to listen/monitor an app's network activities?

I have this one app, and I couldn't figure out where it gets its images. I tried to google an app to listen to other apps connections, but I didn't find any. I'm looking for similar functionality as Google Chrome's network tab from developer menu.

I have rooted Nexus 4 with 4.2.2.

18

OS Monitor lists network connections by app:

OS Monitor: Connections Connection Tracker
OS Monitor and Connection Tracker listing connections (source: Google Play; click image to enlarge)

As you can see, OS Monitor lists up all connections, and lists the corresponding app "owning" this connection along. This should enable you to see all servers your suspicious app connects to. There are other apps available with the same feature as well, as e.g. Connection Tracker shown in the second screenshot.

If you really need the full URL, the above won't bring you there (both apps use methods similar to netstat, which only reveals the hosts). Instead, you might want to take a look at e.g. tPacketCapture, which "sniffs" your network traffic (without requiring root), and saves the protocol in so called .pcap files. These again can be read then by e.g. Shark Reader.

  • I couldn't really get the URLs of connections in neither of them, or then I couldn't find the place for that. OS Monitor is crashing. – naf Apr 11 '13 at 11:56
  • "OS Monitor crashing" must mean you're running JellyBean (known issue, they're working on it). And no, both apps seem to use netstat, which does not reveal the full URL but just the server. As you didn't specify what exactly you intend, I obviously mis-interpreted this part as "checking where that server is". If you really want the full URL, you either can look into the logs (logcat, maybe it's put there), or need a "packet sniffer". – Izzy Apr 11 '13 at 12:02
10

I have been using Packet Capture app, which for me is simpler than setting-up "wireshark" on Android.

The app is free, doesn't require root access, but may request to install user certificate to decrypt SSL connection (it's using MITM technique, as mentioned on its app page; you don't need to install it if you don't want to know the content of SSL connection)

Usage

  1. Open Packet Capture app
  2. Tap the Play (green triangle) icon to start capturing
  3. While it's active, open the app you want to listen its network activity
  4. Wait until the app finish its network operation
  5. Switch to Packet Capture app, and tap the Stop (red square) icon to stop capturing
  6. Open the log by tapping its entry

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