| 限定符和类型 | 类和说明 |
|---|---|
static class |
ShellKit.CommandResult |
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
COMMAND_EXIT |
static String |
COMMAND_LINE_END |
static String |
COMMAND_SH |
static String |
COMMAND_SU |
| 构造器和说明 |
|---|
ShellKit() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ShellKit.CommandResult |
execCommand(List<String> commands,
boolean isRoot,
boolean isNeedResultMsg) |
static ShellKit.CommandResult |
execCommand(String[] commands,
boolean isRoot,
boolean needResponse)
execute shell commands
ShellKit.CommandResult.result is -1, there maybe some excepiton. |
static ShellKit.CommandResult |
execCommand(String command,
boolean isRoot) |
static ShellKit.CommandResult |
execCommand(String command,
boolean isRoot,
boolean isNeedResultMsg) |
static boolean |
hasRootPermission()
check whether has root permission
|
public static boolean hasRootPermission()
public static ShellKit.CommandResult execCommand(String command, boolean isRoot)
public static ShellKit.CommandResult execCommand(String command, boolean isRoot, boolean isNeedResultMsg)
public static ShellKit.CommandResult execCommand(List<String> commands, boolean isRoot, boolean isNeedResultMsg)
public static ShellKit.CommandResult execCommand(String[] commands, boolean isRoot, boolean needResponse)
ShellKit.CommandResult.result is -1, there maybe some excepiton.commands - command arrayisRoot - whether need to run with rootneedResponse - whether need result msgCopyright © 2016. All rights reserved.