Capturing network packets on a phone is a powerful way to debug apps, verify privacy settings, or simply learn how data moves across a Wi‑Fi network. While full‑blown Wi‑Fi monitoring (monitor mode) normally needs root, you can still sniff the traffic that your Android device itself generates and receives – all without unlocking the bootloader or flashing custom firmware.
tcpdump inside Termux, record a .pcap file, and open it in Wireshark on a PC. You’ll also understand the inherent limitations of a no‑root sniffer.pkg update && pkg upgrade -y
pkg install -y git curl wget proot-distro
Why this matters: Updating ensures you have the latest binaries that work with the current Android runtime. The proot-distro package is optional for later Linux‑based analysis, but installing it now avoids extra steps later.
tcpdump package. Install it with:
pkg install -y tcpdump
tcpdump --version
You should see a version string like tcpdump version 4.9.3.Note: The binary is built for Android’s ARM/ARM64 architecture. If you run a non‑standard CPU (e.g., x86 tablets) you may need to compile from source – that is beyond the scope of a no‑root tutorial.
Starting with Android 10, apps need explicit runtime permission to access the network interface for packet capture.
android.permission.CAPTURE_NETWORK_TRAFFIC permission via termux-setup-storage (which also creates a shared storage directory):
termux-setup-storage
This will pop up a system dialog – tap Allow.android.permission.ACCESS_FINE_LOCATION permission. Some Android versions tie Wi‑Fi packet capture to location because Wi‑Fi scans can reveal location data.
Open Android Settings → Apps → Termux → Permissions → Location → Allow only while using the app (or Allow if you prefer).If the permission dialog does not appear, you can manually enable it in Settings → Apps → Termux → Permissions.
Android names its network interfaces differently on each device. The most common names are wlan0 and wlp2s0. We’ll discover the correct one with ip.
ip link show
Look for a line that contains state UP and the word wlan. Example output:
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff
In this case the interface name is wlan0. Remember it for the capture command.
Now we’re ready to start sniffing. The simplest command records everything for a limited time.
/data/data/com.termux/files/home, but it’s easier to use the shared ~/storage/downloads folder created by termux-setup-storage:
cd ~/storage/downloads
tcpdump -i wlan0 -w wifi_capture.pcap -C 10 -Z $(whoami)
-i wlan0 – the interface identified earlier.-w wifi_capture.pcap – write raw packets to this file.-C 10 – rotate the file every 10 MB (creates wifi_capture1.pcap, wifi_capture2.pcap, …).-Z $(whoami) – drop root privileges (required on newer Android versions).When the capture stops you’ll see something like:
12345 packets captured
12345 packets received by filter
0 packets dropped by kernel
That means the capture succeeded and the file is ready for analysis.
Wireshark on a desktop provides a far richer UI for packet inspection.
Download folder and copy wifi_capture*.pcap to a local directory..pcap file. You can filter by protocol (e.g., http, dns) or by IP address to focus on the device’s traffic.wlan1). If tcpdump reports “interface not found”, re‑run ip link show to verify the name.-c option to limit the number of packets, or the -G option to rotate files by time.Below are a few tweaks you might find useful.
tcpdump -i wlan0 -w http_only.pcap 'tcp port 80'
tcpdump -i wlan0 -w dns.pcap -n -s 0 udp port 53
timeout 60 tcpdump -i wlan0 -w short_run.pcap
Note: timeout is part of the coreutils package. Install it with pkg install coreutils if missing.
tcpdump -i wlan0 -w test.pcap.~/storage/downloads avoids sandbox restrictions.This usually means the binary is incompatible with the device’s CPU architecture. Verify your device is ARM64 (most modern phones). If it’s an x86 tablet, consider using Termux’s pkg install qemu-user-static to emulate, but performance will be poor.
When you’re done, it’s good practice to remove the large capture files to free space.
rm ~/storage/downloads/wifi_capture*.pcap
You can also uninstall tcpdump if you no longer need it:
pkg uninstall tcpdump
If you ever decide to root your device, a cheap USB‑OTG Wi‑Fi dongle that supports monitor mode can give you full network visibility. The steps are similar, but you would replace wlan0 with the adapter’s interface (often wlan1) and add the -I flag to enable monitor mode. Because this tutorial focuses on a no‑root workflow, we only mention it for future reference.
By installing Termux and tcpdump, granting the necessary permissions, and using the right capture options, you can turn any Android phone into a lightweight Wi‑Fi sniffer that records the device’s own traffic. While you won’t see every packet on the network without root, the data you capture is sufficient for debugging apps, checking DNS leaks, verifying that a VPN is actually encrypting traffic, and learning how Android communicates over Wi‑Fi.
Remember to respect privacy – never capture traffic from devices you don’t own or have explicit permission to monitor.









