title: java.io.IOException: write failed: EPIPE (Broken pipe) while take tcpdump from application process in android
body: <p>trying to take tcpdump from application or from code.i am using following code </p>
  
  <pre><code>try {
          Process process = Runtime.getRuntime().exec(
                  "su");
  
          DataOutputStream os = new DataOutputStream(
                  process.getOutputStream());
          os = new DataOutputStream(process.getOutputStream());
          os.writeBytes("/data/local/tcpdump-arm -c 10 -s 0 -w /data/local/out.txt\n");
          os.writeBytes("exit\n");
          os.flush();
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  </code></pre>
  
  <p>but getting exception java.io.IOException: write failed: EPIPE (Broken pipe) at os.writeBytes("/data/local/tcpdump-arm -c 10 -s 0 -w /data/local/out.txt\n");.Please help..</p>