title: Wrong output with logcat inside my application
body: <p>I'm developing a multi-tab application. In one of the tab I want to show the logcat but I have a lot of problem running it correctly.</p>
  
  <p>Right now I'm using the following command but I don't get anything in my TextView. :</p>
  
  <pre><code>Process process = Runtime.getRuntime().exec("/system/bin/logcat -s com.vittorio:I");
  </code></pre>
  
  <p>But when I run the same command into Terminal it works flawlessy.</p>
  
  <p>I've also tryed this other command :</p>
  
  <pre><code>Process process = Runtime.getRuntime().exec("/system/bin/logcat *:I");
  </code></pre>
  
  <p>but for some reason it prints also Debug level messages ...</p>
  
  <p>EDIT (1):</p>
  
  <p>I've by-passed the problem by adding an high-level filter (java) to the whole log.. so I only print in my textview what I need. It's a very dirty solution but for now is the only one I managed to come with.</p>
  
  <p>I would like to point out that I'me experiencing different behaviours on my phones :</p>
  
  <ul>
  <li>Galaxy S Plus (rooted) : I can see the log.</li>
  <li>Galaxy Y (rooted) : No log</li>
  <li>Nexus One (not-rooted) : No log</li>
  </ul>
  
  <p>EDIT (2) - <strong>SOLVED (NEED ROOTED PHONE)</strong>:</p>
  
  <p>After some struggling I managed to solve my problem. Actually navigating through the init.rc system file I saw that the permissions for /dev/log/main and /dev/log/system where setted to 620.. that's why I couldn't open the log on some of my phones. So I rooted also my Nexus One and added this commands into my activity before calling the logcat command :</p>
  
  <pre><code>Process process_su = Runtime.getRuntime().exec("su");
  Process process_ch = Runtime.getRuntime().exec("chmod 777 /dev/log/main");
  </code></pre>
  
  <p>Done! :D</p>
  
  <p>Hope this info will help anyone who will face my same issue.</p>