如何使用ADB shell查找进程正在使用的端口?

use*_*407 8 linux port android netstat adb

例如,在Android中,进程1234的PID使用端口2222,2223,2224.现在我有一个PID 1234.我想知道如何找到进程正在使用的端口号2222,2223,2224?

我尝试过使用netstat -anp就像在Linux中一样,但是没有用.ADB shell中的netstat -anp与netstat具有相同的效果,netstat没有任何命令参数.

Ale*_* P. 10

你可以使用busybox netstat -ptcat /proc/1234/net/tcp

  • 这假设已安装 busybox。 (2认同)