title: Kill process on Android by pid
body: <p>I found the some similar questions around stackoverflow, but I haven't found
  one that works in my case.</p>
  
  <p>So far, I tried:</p>
  
  <pre><code>    Runtime.getRuntime().exec(new String[]{"su","-c","kill -9 "+pid});
      //am.killBackgroundProcesses(pkgName);
      //android.os.Process.killProcess(pid); 
  </code></pre>
  
  <p>While if I typed <code>su -c kill -9 pid</code> from <strong>adb</strong>, it worked! Why not work programmatically?</p>
  
  <p>Do I need to put any <code>permission</code> in <code>AndroidManifest.xml</code>?</p>
  
  <p>Btw, the device has been rooted.</p>