title: How can I execute "su" on Android?
body: <pre><code>process = Runtime.getRuntime().exec("su");
  os = new DataOutputStream(process.getOutputStream());
  os.writeBytes(command + "\n");
  os.writeBytes("exit\n");
  os.flush();
  process.waitFor();
  </code></pre>
  
  <p>The system says:<code>"07-06 11:01:34.337: I/System.out(3864): su: uid 10170 not allowed to su"</code></p>
  
  <p>I execute "adb root" in my terminal</p>
  
  <pre><code>:~/android/android-sdk/platform-tools$ ./adb root
  
  adbd is already running as root
  </code></pre>
  
  <p>Any ideas?</p>