I would like to capture TCP packets as well as protocol data such as HTTP and HTTPS in Android, similar to Wireshark in Windows.
How can I do this in Android?
Limitation
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
Limitation
Phone should be rooted
Limitation
Phone should be rooted
Reason - the generated PCAP files can be analyzed in WireShark which helps us in doing the analysis.
https://play.google.com/store/apps/details?id=jp.co.taosoftware.android.packetcapture&hl=en
Advantages
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.
http://lifehacker.com/5369381/turn-your-windows-7-pc-into-a-wireless-hotspot