Steve Jobs Steve Jobs - 1 year ago 129
Android Question

Capture Packets in Android

I need to capture packets in android like how I could do using Wireshark in Windows. I wanted to design my own packet capturing application if no app like Wireshark exists for android. I basically wanted to capture the tcp, http and https packets. If no application exists, how can I start designing my packet capturing application. Will be helpful if someone explain building such networking apps from scratch (or even provide links that explain the building of similar apps).

Answer Source

Option 1 - Android PCAP


Android PCAP should work so long as:

Your device runs Android 4.0 or higher (or, in theory, the few devices which run Android 3.2). Earlier versions of Android do not have a USB Host API

Option 2 - TcpDump


Phone should be rooted

Option 3 - bitshark (I would prefer this)


Phone should be rooted

Reason - the generated PCAP files can be analyzed in WireShark which helps us in doing the analysis.

Other Options without rooting your phone

  1. tPacketCapture


Using tPacketCapture is very easy, captured packet save into a PCAP file that can be easily analyzed by using a network protocol analyzer application such as Wireshark.

  1. You can route your android mobile traffic to PC and capture the traffic in the desktop using any network sniffing tool.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download