MCPcopy Create free account
hub / github.com/afkT/DevUtils / execCmd

Method execCmd

lib/DevApp/src/main/java/dev/utils/app/ShellUtils.java:33–38  ·  view source on GitHub ↗

执行 shell 命令 @param command 待执行命令 @param isRoot 是否以 root 权限执行 @return CommandResult

(
            final String command,
            final boolean isRoot
    )

Source from the content-addressed store, hash-verified

31 * @return {@link CommandResult}
32 */
33 public static CommandResult execCmd(
34 final String command,
35 final boolean isRoot
36 ) {
37 return execCmd(new String[]{command}, isRoot, true);
38 }
39
40 /**
41 * 执行 shell 命令

Callers 15

requestRootMethod · 0.95
isGrantedRootMethod · 0.95
getAppListMethod · 0.95
isInstalledAppMethod · 0.95
getAppInstallPathMethod · 0.95
clearAppDataCacheMethod · 0.95
getAppMessageMethod · 0.95
getVersionCodeMethod · 0.95
getVersionNameMethod · 0.95
installAppMethod · 0.95
installAppSilentMethod · 0.95
uninstallAppMethod · 0.95

Calls 8

consumeInputStreamMethod · 0.95
eTagMethod · 0.95
closeIOQuietlyMethod · 0.95
writeMethod · 0.80
getBytesMethod · 0.65
flushMethod · 0.65
toArrayMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected