title: How to write entire Logcat in to sdcard?
body: <p>I need to write entire Logcat in to sdcard not the filtered Logcat. So I tried doing this way</p>
  
  <pre><code>String[] cmd  ={"/system/bin/logcat " +"-f"+" /sdcard/d.txt"};
      Log.d("NTK","cmd string"+cmd);
      Runtime run = Runtime.getRuntime();
  
      Process pr;
      try {
          pr = run.exec(cmd);
  
      pr.waitFor();
      BufferedReader buf = new BufferedReader(new InputStreamReader(pr.getInputStream()));
      String line = "";
      while ((line=buf.readLine())!=null) {
          System.out.println(line);
          Log.i(NTL, "lines"+line);
      }
      } catch (IOException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
      } catch (InterruptedException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  </code></pre>
  
  <p>I have given all permissions in manifest file too.</p>
  
  <p>Not able to  write logcat in to sdcard.</p>