android runtime command problem
<p>i'm trying to reboot my android device (doing android porting) for test.</p>

<p>my code :</p>

<pre><code>try {
            Runtime rt = Runtime.getRuntime();
            Process proc = rt.exec("reboot");

            InputStream is = proc.getInputStream();
            InputStreamReader isr = new InputStreamReader(is);
            BufferedReader br = new BufferedReader(isr);
            String line;

            while ((line = br.readLine()) != null) {
                Log.i("runtime","line : " + line);
            }
        } catch (Throwable t) {
            t.printStackTrace();
        }
</code></pre>

<p>but the device didn't reboot itself. </p>

<p>if i change the command to </p>

<pre><code>Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("ls");
</code></pre>

<p>it ran fine , show all dir. </p>

<p>and when i input "reboot" in adb shell , it also worked. why???</p>

<p>reboot is just one of toolbox commands, I also run other command which can work from shell.
But, none of them can work from rt.exec except 'ls'. 
Could some one tell me how to make it works from android runtime ?
Thanks</p>
