Stock OOS actually includes tcpdump

motopig

Senior Member
Dec 30, 2009
115
11
38
I have installed tcpdump on my last 2-3 phones so I can capture the network traffic of select games for datamining, among other things. I've always have to locate my own copy and insert it myself.

While I tried to do the same with my stock OnePlus 5T, before I got to the point of finding a compiled arm64 binary, I found that OnePlus did that for me already, and put it right where I expect it to be. But it won't show up right away; there's some work that needs to be done but it's simple.

For anyone who can make use of it, here are my steps to get it:
1. Root with Magisk.
2. Enable Developer Options.
3. In Developer Options, tap Get logs. This starts OnePlusLogKit. Yup, this thing that someone calls "malware" actually is useful.
4. Check "Network Tcpdump Log". You can then uncheck it. This places tcpdump into /system/xbin.
5. Use ADB, Root Explorer or whatever to confirm it is there.

To make use of it, you probably want Busybox installed - there's a Magisk module for it.

The copy of tcpdump thus obtained is 4.7.4 which is old, but should tide me over until I figure out how to compile 4.9.2 for arm64 and pack it into a Magisk 15 module, which is for another day.