查看安卓应用本地监听的端口

1.查看安卓设备开放的端口
adb shell netstat -a | grep -E 'LISTEN|udp*'

2.将端口号转换为16进制
https://tool.lu/hexconvert/
/proc/net/后面是端口使用的协议,如tcp6
adb shell grep -i f099 /proc/net/tcp6

通过上述命令获得应用uid为10072
如果uid大于10000,可以通过如下方式获得应用的用户名为u0_a72
u0_a'+str(uid-10000)
3.根据用户名找到应用
adb shell ps | grep u0_a72

posted @ 2022-02-10 18:32  micr067  阅读(2456)  评论(0编辑  收藏  举报