Question

I want to send commands to (and receive output from) the Android shell (BusyBox) from a standard Android App. How would I go about doing this? 1 hour of googling yielded no result.

Help very appreciated.

Regards, Svante

Was it helpful?

Solution

Process proc = Runtime.getRuntime().exec("ls -la");

This will execute ls -la command and return you the process. If you want more complicated interaction you should use input and output stream: proc.getInputStream() and proc.getOutputStream()

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top