I want to capture network data packets on android app. Do you have any suggestions or source code to help me understand if this is possible?
Asked
Active
Viewed 1.3k times
6
-
1I certainly hope that this is impossible, for obvious privacy and security reasons. – CommonsWare Aug 09 '12 at 00:12
-
2It is definitely possible, because Juniper network's VPN app uses it. – anishsane Nov 17 '12 at 13:42
3 Answers
5
Without root you will have to use a pass-thru method.
- Setup your PC/Mac to share your wired connection through the wireless adapter
- Connect to the wireless adapter with your Android device
- Run wireshark

Error 454
- 7,255
- 2
- 33
- 48
-
I want to capture network data packets on my android device by my app.Not pc only device.I want to list which sites users are connected on device. Thanks – Kadir GÜZEL Aug 09 '12 at 09:59
-
1And that's what I've just explained how to do. Unless you have root, you can't trace packets. Your only choice is what I've listed above which lets you sniff packets that your android device is sending out by sending traffic through the PC. – Error 454 Aug 09 '12 at 16:36
-
0
most apps that filter/sniff/account network traffic in android without root use the loopback vpn trick, where you setup a vpn and inspect the traffic (or whatever you want)
for sniffer, check tpacketcapture, but i don't think you have the source... try to contact then, or check fdroid for a similar open source app

higuita
- 2,127
- 20
- 25
0
This should be just man-in-the-middle approach - think about setting up a proxy.

nickolay
- 3,643
- 3
- 32
- 40