I have written the following code and cannot quite figure out how to solve the error. Not sure if this information will be found useful, but I am using a Mac and using the e
You need to use the exec(String[] cmdarray)
function to send arguments, the single argument version of the function splits the string on space, and that spells trouble if your path contains spaces.
you also need to specify the full path (maybe /usr/bin/adb?).
Like this:
Process process = runtime.exec(new String[] {"/usr/bin/adb", "devices"});