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(); } }
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); }
public static void startService(String service, boolean save, Context context) { RootUtils.runCommand("start " + service); if (save) commandSaver(context, service, "start " + service); }
private static void run(String command, String path, Context context) { RootUtils.runCommand(command); commandSaver(context, path, command); }