示例#1
0
 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;
 }
示例#2
0
 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;
 }
示例#3
0
 /**
  * *********************************************************************** Static methods
  * **********************************************************************
  */
 public static boolean chmod(String file, String mode) {
   if (NativeTask.runCommand("chmod " + mode + " " + file) == 0) {
     return true;
   }
   return false;
 }