public static boolean runStandardCommand(String command) { Log.d(TAG, "Standard-Command ==> \"" + command + "\""); int returncode = NativeTask.runCommand(command); if (returncode == 0) { return true; } Log.d(TAG, "Standard-Command error, return code: " + returncode); return false; }
public static boolean runRootCommand(String command) { Log.d(TAG, "Root-Command ==> su -c \"" + command + "\""); int returncode = NativeTask.runCommand("su -c \"" + command + "\""); if (returncode == 0) { return true; } Log.d(TAG, "Root-Command error, return code: " + returncode); return false; }
/** * *********************************************************************** Static methods * ********************************************************************** */ public static boolean chmod(String file, String mode) { if (NativeTask.runCommand("chmod " + mode + " " + file) == 0) { return true; } return false; }