mohammad jannesary
mohammad jannesary

Reputation: 1821

Access All open ports in android

can I access all opening port in Android?

I did a quick search and realized it's just not possible to have a list of opening port or to know which application is using which port.
Do you have any experience on it?

Upvotes: 1

Views: 4137

Answers (1)

Vlad
Vlad

Reputation: 9481

Android is a normal Linux system, so you can use the standard Linux facilities to find that.

To see the list of open ports use netstat command like this:

 netstat -nap
 Proto Recv-Q Send-Q Local Address          Foreign Address        State
 tcp       0      0 127.0.0.1:5037         0.0.0.0:*              LISTEN
 tcp       0      0 0.0.0.0:5555           0.0.0.0:*              LISTEN
 tcp      97      0 10.0.2.15:5555         10.0.2.2:59176         ESTABLISHED

This information actually comes from /proc filesystem

For example information about TCP sockets comes from /proc/net/tcp

Upvotes: 2

Related Questions