Beispiel #1
0
 public static void bringCoresOnline() {
   try {
     for (int i = 0; i < CPU.getCoreCount(); i++)
       RootUtils.runCommand("echo 1 > " + String.format(CPU_CORE_ONLINE, i));
     // Give CPU some time to bring core online
     Thread.sleep(10);
   } catch (InterruptedException e) {
     e.printStackTrace();
   }
 }
Beispiel #2
0
  public static void stopService(String service, boolean save, Context context) {
    RootUtils.runCommand("stop " + service);
    if (service.equals(HOTPLUG_MPDEC)) bringCoresOnline();

    if (save) commandSaver(context, service, "stop " + service);
  }
Beispiel #3
0
  public static void startService(String service, boolean save, Context context) {
    RootUtils.runCommand("start " + service);

    if (save) commandSaver(context, service, "start " + service);
  }
Beispiel #4
0
 private static void run(String command, String path, Context context) {
   RootUtils.runCommand(command);
   commandSaver(context, path, command);
 }