It might tell you why on standard error:
final Process p = Runtime.getRuntime().exec(tcpdumpCommand);
final BufferedReader reader = new BufferedReader(
new InputStreamReader(p.getErrorStream()));
(new Thread() {
public void run() {
while ((line = reader.readLine()) != null) {
Log.d("tcpdump", "stderr: " + line);
}
Log.d("tcpdump", "end of stderr");
}
}).start();
...and then look in logcat. Or try the same with getOutputStream()
(for stdout) instead of getErrorStream()
.
Also if tcpdump was successfully capturing traffic and then abruptly stopped, one possible reason is you've filled the SD card.