Java Code Examples for com.grarak.kerneladiutor.utils.root.Control#runCommand()

The following examples show how to use com.grarak.kerneladiutor.utils.root.Control#runCommand() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CPU.java    From kernel_adiutor with Apache License 2.0 5 votes vote down vote up
public static void setCpuBoostInputFreq(int value, int core, Context context) {
    if (Utils.readFile(CPU_BOOST_INPUT_BOOST_FREQ).contains(":")) {
        String existing = Utils.readFile(CPU_BOOST_INPUT_BOOST_FREQ), newvalues = "";
        String[] parts = existing.split(" ");
        parts[core] = core + ":" + value;
        for (int i = 0; i < parts.length; i++) {
            if (i < parts.length - 1) newvalues = newvalues + parts[i] + " ";
            else newvalues = newvalues + parts[i];

        }
        Control.runCommand(newvalues, CPU_BOOST_INPUT_BOOST_FREQ, Control.CommandType.GENERIC, context);
    }
    else
        Control.runCommand(String.valueOf(value), CPU_BOOST_INPUT_BOOST_FREQ, Control.CommandType.GENERIC, context);
}
 
Example 2
Source File: CPUHotplug.java    From KA27 with Apache License 2.0 4 votes vote down vote up
public static void setStateHelperMaxCpusOnline(int value, Context context) {
    Control.runCommand(String.valueOf(value), STATE_HELPER_MAX_CPUS_ONLINE, Control.CommandType.GENERIC, context);
}
 
Example 3
Source File: VM.java    From KA27 with Apache License 2.0 4 votes vote down vote up
public static void setExtraFreeKbytes(int value, Context context) {
    Control.runCommand(String.valueOf(value), VM_EXTRA_FREE_KBYTES, Control.CommandType.GENERIC, context);
}
 
Example 4
Source File: CPUHotplug.java    From kernel_adiutor with Apache License 2.0 4 votes vote down vote up
public static void activateAutoSmpScroffSingleCoreActive(boolean active, Context context) {
    Control.runCommand(active ? "1" : "0", HOTPLUG_AUTOSMP_SCROFF_SINGLE_CORE, Control.CommandType.GENERIC, context);
}
 
Example 5
Source File: Sound.java    From kernel_adiutor with Apache License 2.0 4 votes vote down vote up
public static void activateWcdSpkr_Drv_Wrnd(boolean active, Context context) {
    Control.runCommand(active ? "1" : "0", WCD_SPKR_DRV_WRND, Control.CommandType.GENERIC, context);
}
 
Example 6
Source File: CPUHotplug.java    From KA27 with Apache License 2.0 4 votes vote down vote up
public static void setAutoHotplugMinOnline(int value, Context context) {
    Control.runCommand(String.valueOf(value), HOTPLUG_AUTO_HOTPLUG_MIN_ONLINE, Control.CommandType.GENERIC, context);
}
 
Example 7
Source File: CPUHotplug.java    From KA27 with Apache License 2.0 4 votes vote down vote up
public static void activateMakoHotplug(boolean active, Context context) {
    Control.runCommand(active ? "1" : "0", MAKO_HOTPLUG_ENABLED, Control.CommandType.GENERIC, context);
    if (active) togglehotplugs("MakoHotPlug", context);
}
 
Example 8
Source File: CPUHotplug.java    From KA27 with Apache License 2.0 4 votes vote down vote up
public static void activateIntelliPlugEco(boolean active, Context context) {
    Control.runCommand(active ? "1" : "0", HOTPLUG_INTELLI_PLUG_ECO, Control.CommandType.GENERIC, context);
}
 
Example 9
Source File: Thermal.java    From kernel_adiutor with Apache License 2.0 4 votes vote down vote up
public static void setFrancoThermalPoll(int value, Context context) {
    String command = String.valueOf(value);
    Control.runCommand(command, THERMAL_FRANCO_POLL, Control.CommandType.GENERIC, context);
}
 
Example 10
Source File: Thermal.java    From kernel_adiutor with Apache License 2.0 4 votes vote down vote up
public static void setFrancoThermalStageFour(int freq, Context context) {
    Control.runCommand(String.valueOf(freq), THERMAL_FRANCO_STAGE_FOUR, Control.CommandType.GENERIC, context);
}
 
Example 11
Source File: CPUHotplug.java    From KA27 with Apache License 2.0 4 votes vote down vote up
public static void setMSMSleeperMaxOnline(int value, Context context) {
    Control.runCommand(String.valueOf(value), MSM_SLEEPER_MAX_ONLINE, Control.CommandType.GENERIC, context);
}
 
Example 12
Source File: CPUHotplug.java    From kernel_adiutor with Apache License 2.0 4 votes vote down vote up
public static void setDynPlugDownTimerCnt(int value, Context context) {
    Control.runCommand(String.valueOf(value), HOTPLUG_DYN_PLUG_DOWN_TIMER_CNT, Control.CommandType.GENERIC, context);
}
 
Example 13
Source File: CPUHotplug.java    From KA27 with Apache License 2.0 4 votes vote down vote up
public static void activateAlucardHotplugSuspend(boolean active, Context context) {
    Control.runCommand(active ? "1" : "0", ALUCARD_HOTPLUG_SUSPEND, Control.CommandType.GENERIC, context);
}
 
Example 14
Source File: CPUHotplug.java    From kernel_adiutor with Apache License 2.0 4 votes vote down vote up
public static void setAlucardHotplugSamplingRate(int value, Context context) {
    Control.runCommand(String.valueOf(value), ALUCARD_HOTPLUG_SAMPLING_RATE, Control.CommandType.GENERIC, context);
}
 
Example 15
Source File: CPU.java    From kernel_adiutor with Apache License 2.0 4 votes vote down vote up
public static void activateCpuTouchBoost(boolean active, Context context) {
    Control.runCommand(active ? "1" : "0", CPU_TOUCH_BOOST, Control.CommandType.GENERIC, context);
}
 
Example 16
Source File: Screen.java    From KA27 with Apache License 2.0 4 votes vote down vote up
public static void setGreenMids(String value, Context context) {
    Control.runCommand(value, GAMMACONTROL_GREEN_MIDS, Control.CommandType.GENERIC, context);
}
 
Example 17
Source File: CPUHotplug.java    From KA27 with Apache License 2.0 4 votes vote down vote up
public static void setMakoHotplugMaxLoadCounter(int value, Context context) {
    Control.runCommand(String.valueOf(value), MAKO_HOTPLUG_MAX_LOAD_COUNTER, Control.CommandType.GENERIC, context);
}
 
Example 18
Source File: Thermal.java    From kernel_adiutor with Apache License 2.0 4 votes vote down vote up
public static void activateTempSafety(boolean active, Context context) {
    Control.runCommand(active ? "1" : "0", getThermalFile(PARAMETERS_TEMP_SAFETY), Control.CommandType.GENERIC, context);
}
 
Example 19
Source File: VM.java    From kernel_adiutor with Apache License 2.0 4 votes vote down vote up
public static void setDirtyRatio(int value, Context context) {
    Control.runCommand(String.valueOf(value), VM_DIRTY_RATIO, Control.CommandType.GENERIC, context);
}
 
Example 20
Source File: Screen.java    From KA27 with Apache License 2.0 4 votes vote down vote up
public static void setColorCalibrationKcal(String value, Context context) {
    Control.runCommand(value, SCREEN_KCAL_CTRL, Control.CommandType.GENERIC, context);
}