You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we use AdbServer for triggering an execution of shell commands on the PC, however because CmdCommandPerformer::perform() uses Runtime::exec(String command) instead of Runtime::exec(String[] cmdarray) it is impossible to execute commands which contain whitespaces in their arguments, or commands which use output redirection or pipes.
It would be great if it was possible to execute commands via Runtime::exec(String[] cmdarray).
E.g. instead of command adbServer.performCmd("script.sh \"some text\"") which fails, execute command adbServer.performCmd(arrayOf("script.sh", "some text") which would execute correctly.
Another example is adbServer.performCmd(arrayOf("sh", "-c", "adb shell dumpsys deviceidle | grep mForceIdle")
The text was updated successfully, but these errors were encountered:
Sometimes we use AdbServer for triggering an execution of shell commands on the PC, however because
CmdCommandPerformer::perform()
usesRuntime::exec(String command)
instead ofRuntime::exec(String[] cmdarray)
it is impossible to execute commands which contain whitespaces in their arguments, or commands which use output redirection or pipes.It would be great if it was possible to execute commands via
Runtime::exec(String[] cmdarray)
.E.g. instead of command
adbServer.performCmd("script.sh \"some text\"")
which fails, execute commandadbServer.performCmd(arrayOf("script.sh", "some text")
which would execute correctly.Another example is
adbServer.performCmd(arrayOf("sh", "-c", "adb shell dumpsys deviceidle | grep mForceIdle")
The text was updated successfully, but these errors were encountered: