title: How to redirect my log output from logcat to the SD-Card on an android device?
body: <p>I'm trying to redirect the log of my app to the sdcard file. But i failed to do so. I'm trying something like this.</p>
  
  <pre><code>String cmd= "logcat -v time   ActivityManager:W  myapp:D  *:* &gt;\""+file.getAbsolutePath()+"\"";
  Runtime.getRuntime().exec(cmd);
  </code></pre>
  
  <p>I tried the -f option also but it is not working either.</p>