Network & Connectivity
Android 1.0+
Risk: READ_ONLY
Network Sockets & Connections (netstat)
Lists all listening network ports and active TCP/UDP socket connections on device.
Command Syntax
adb shell netstat -tuln
Generic Syntax:
netstat [-a] [-t] [-u] [-l] [-n] [-p]
Options & Parameters
| Flag | Description |
|---|---|
| -tuln | TCP, UDP, Listening, Numeric ports |
Real-World Usage Examples
List open listening TCP/UDP ports
Shows open ports
adb shell netstat -tuln
Output:
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:5555 0.0.0.0:* LISTEN