title: How to use Runtime.getRuntime().exec("cmd")
body: <p>In my application I'm trying to execute a native code which is present on my SD card.</p>
  
  <pre><code>File sdCard = getExternalFilesDir(null); // directory where native file is placed
  String nativeFile = "nativeFile";
  
  String cmd = "shell /system/bin/chmod 0777 " + sdCard.getAbsolutePath() + "/" + nativeFile;
  Process proc = Runtime.getRuntime().exec(cmd);
  </code></pre>
  
  <p>But as soon as <code>Runtime.getRuntime().exec(cmd)</code> is executed, it throws error:</p>
  
  <pre><code>java.io.IOException: Error running exec(). Command: [shell, /system/bin/chmod, 0777, /storage/emulated/0/Android/data/com.example.andridutilproject/files/native] Working Directory: null Environment: null
  </code></pre>
  
  <p>Any suggestions, how to resolve this?</p>