I would like to run a command like am -help
and get usage information for that command. However, the -help
parameter does not seem to work on the Process Runtime. How to make this work?
cmd1[0] = "/system/bin/sh";
cmd1[1] = "-c";
cmd1[2] = "/system/bin/am -help" //I want to do sth like this
Process process = Runtime.getRuntime().exec(cmd1);
The command works without the -help
. Is there any way of getting Android Shell commmands' usage information and/or syntaxes?
Note that if I don't send am -help
and just send the command am
then it automatically returns usage information for that command. Is there any way to invoke that response in any other way?