I developed an application that changes the frequency of the processor. My application worked perfectly with my Nexus 4 Lollipop, I can turn on / off the kernels, change the frequency of each of them, etc. But now I switched to my Neusus 6 Nougat and did not allow me to reduce the frequency to a certain level, for example:
(A knob is a user space)
These are the possible frequencies:
300000 422400 652800 729600 883200 960000 1036800 1190400 1267200 1497600 1574400 1728000 1958400 2265600 2457600 2496000 2572800 2649600
If I try to repeat any frequency below "1497600", my mobile phone will automatically raise this frequency to "1497600", but ANY speed above this level will stick normally. I tried stopping mpdecision, and after that rename it, but no change. Is there any way to know if mpdecision is stopped? Does the new Android not allow me to change these values?
private void writeSpeedOnCore(int core,int speed){
StringBuilder path = new StringBuilder();
if(speed!=0) {
if(currentClockLevel[core][2]==0) {
turnCoreOnOff(core, true);
}
adjustMinAndMaxSpeed(core);
try {
path.setLength(0);
path.append(String.format("echo %d" + " > " + pathCPU + core + "/cpufreq/scaling_setspeed", speed));
Process proc = Runtime.getRuntime().exec(new String[]{"su", "-c", path.toString()});
proc.waitFor();
currentClockLevel[core][0] = speed;
} catch (InterruptedException | IOException e) {
e.printStackTrace();
}
}
else
turnCoreOnOff(core,false);
}
source
share