打开cmd窗口,输入adb shell

输入

netstat -tuln

返回

emulator64_x86_64_arm64:/ $ netstat -tuln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
udp        0      0 0.0.0.0:5353            0.0.0.0:*
udp        0      0 0.0.0.0:50536           0.0.0.0:*
udp6       0      0 [::]:40327              [::]:*
udp6       0      0 [::]:5353               [::]:*
udp6       0      0 [::]:5353               [::]:*
emulator64_x86_64_arm64:/ $

其他参数说明

emulator64_x86_64_arm64:/ $ netstat --help
Toybox 0.8.4-android multicall binary: https://landley.net/toybox (see toybox --help)

usage: netstat [-pWrxwutneal]

Display networking information. Default is netstat -tuwx

-r      Routing table
-a      All sockets (not just connected)
-l      Listening server sockets
-t      TCP sockets
-u      UDP sockets
-w      Raw sockets
-x      Unix sockets
-e      Extended info
-n      Don't resolve names
-W      Wide display
-p      Show PID/program name of sockets
emulator64_x86_64_arm64:/ $

 

posted on 2025-04-19 10:02  le.li  阅读(132)  评论(0)    收藏  举报