title: Android shell commands fail to find /data directory
body: <p>In my application I'm doing:</p>
  
  <pre><code>try {
      String[] cmd = {"su", "-c",  "\"ls /data/\""}; //to debug, will be cp /src /dest
  
      ProcessBuilder builder = new ProcessBuilder(cmd);
      builder.redirectErrorStream(true);
      Process process = builder.start();
      InputStream is = process.getInputStream();
  
      Log.e("copy", is.toString());
      Log.e("copy", convertStreamToString(is));
  
      try {
          process.waitFor();
      } catch (InterruptedException e) {
          e.printStackTrace();
      }
  } catch (IOException e1) {
      e1.printStackTrace();
  }
  </code></pre>
  
  <p>The app is installed in <code>/system/app/</code> and running with root permissions.</p>
  
  <p>I see SuperSu's overlay that it's granted permissions for the operation.</p>
  
  <p>With the <code>cp /src /dest</code> in place of <code>ls</code> command above, it doesn't copy, so debugging with <code>ls</code>, I get:</p>
  
  <pre><code>tmp-mksh: ls /data: not found
  </code></pre>
  
  <p>Why is this, and how can I fix it?</p>
  
  <p><strong>NB:</strong> This is the <a href="https://stackoverflow.com/questions/11314821/running-a-shell-command-to-copy-files-from-android-app?rq=1">same issue as this question</a>, except that was resolved by adding external write permissions - I should note that both paths in my command are in <code>/data/..</code>.</p>