title: Effective way to programatically check if I'm rooted on Android?
body: <p>It seems to work, but I'm not positive, as I'm limited (to an AVD) in my ability to test it. I came up with this algorithm to check if I'm rooted. Think it will always work? I'm not convinced.</p>
  
  <pre><code>private boolean isRooted() {
      try {
          Process process = new ProcessBuilder()
              .command("/system/bin/su")
              .redirectErrorStream(false)
              .start();
      } catch (IOException e) { 
          return false;
      }
      return true;
  }
  </code></pre>