Android - List of open ports on Android

I was able to see which app had an open port using standard linux knowledge.

Install terminal emulator or do an adb shell and execute the following:

shell@android:/ $ cat /proc/net/tcp                                          
 sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode  
  0: 0100007F:1C23 00000000:0000 0A 00000000:00000000 00:00000000 00000000  1001        0 2111 1 e22cc000 300 0 0 2 -1  

The important stuff above is:

  • 0100007F:1C23 listen IP-address:port in hex notation, here 127.0.0.1:7203
  • 00000000:0000 remote address empty (listening)
  • 1001 uid of the app

You can map the uid list to apps via How can I find app name by UID?


Install OS Monitor. It will list all the open ports.