Question: I would like know which applications on my android connect to what IP addresses. In essence I would like to know what these apps do in the background without my approval.

I tried a netstat OS call in my monitoring app, which already gives me the open connections and the connected IP addresses, but there is no process name, pid or uid that would allow me to map a connection to a particular app. 'netstat -p' seems not to provide the process info.

Answer: 
I think there are two possible reasons.

1. It is due to permission problems, because some Android distribution version has more restrict permission settings, you should try to read data from /proc/%pid%/net/tcp (%pid% replace by PID for your app).
2. the system is working on IPv6, you need to check "/proc/%pid%/net/tcp6" instead of "/proc/%pid%/net/tcp", its ip will need to convert from IPv6 to IPv4.
Use `busybox` command to get process info

```
busybox netstat -tp

```