I can't get full info from netstat, from not rooted device.
If i use
Process process = Runtime.getRuntime().exec("netstat -n");
with "-n" or other doesn't work. how i read stream from netstat
process.getOutputStream().close();
BufferedReader reader = new BufferedReader(
new InputStreamReader(process.getInputStream()));
String line;
while ((line = reader.readline()) != null) {
// Parse line for required info
}
reader.close();
How can i get pid or process name with using netstat (or something other to monitor network activity) without root
I test it in android 6.0 and get only:
Proto Recv-Q Send-Q Local Address Foreign Address State click to see