title: Android Runtime.getRuntime().exec() to nav through directories
body: <p>So I want to be able to write an app that can turn on and display logcat messages, dmesg, and also be able to run commands like 'ls' 'cat' 'echo' 'cd.'</p>
  
  <p>If I do the following:</p>
  
  <pre><code>nativeProc = Runtime.getRuntime().exec("ls\n");
          BufferedWriter out = new BufferedWriter(new OutputStreamWriter(nativeProc.getOutputStream()));
          BufferedReader in = new BufferedReader(new InputStreamReader(nativeProc.getInputStream()));
          String line = null;
  
          while ((line = in.readLine()) != null) {  
              full = full + "\n" + line;
          }
  </code></pre>
  
  <p>I can put the text "full" to a Text View and see the root directory.</p>
  
  <p>However, that's about all I can do. Let's say I want to find a directory, and change to it, I'm having trouble.</p>
  
  <p>So if I do this:</p>
  
  <pre><code>nativeProc = Runtime.getRuntime().exec("ls\n");
          BufferedWriter out = new BufferedWriter(new OutputStreamWriter(nativeProc.getOutputStream()));
          BufferedReader in = new BufferedReader(new InputStreamReader(nativeProc.getInputStream()));
          String line = null;
  
          while ((line = in.readLine()) != null) {  
              full = full + "\n" + line;
          }
          /* Code here to confirm the existing of a directory*/
  
  
          nativeProc = Runtime.getRuntime().exec("cd tmp\n");
          BufferedReader in2 = new BufferedReader(new InputStreamReader(nativeProc.getInputStream()));
          line = null;
          String test = "\nStart1:\n";
          while ((line = in2.readLine()) != null) {  
              test = test + "\n" + line;
          }
  </code></pre>
  
  <p>I get nothing for both "full" and "text"</p>
  
  <p>Any ideas?</p>