scaling_max_freq抵抗被改变,尽管写权限权限、scaling_max_freq

2023-09-03 22:20:59 作者:余生请你指教

我试图改变存储在/ SYS /设备/系统/ CPU / CPU0 / CPU频率/ scaling_max_freq 这是目前设定为1512000的价值。我试图通过ADB shell来做到这一点。

I am trying to change the value stored in /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq which is currently set to "1512000". I am attempting to do this via adb shell.

我键入su,然后导航到/ SYS /设备/系统/ CPU / CPU0 / CPU频率。然后,我键入

I type su and then navigate to /sys/devices/system/cpu/cpu0/cpufreq. I then type

chmod 777 scaling_max_freq

我确认着chmod通过键入工作

I confirm that the chmod worked by typing

ls -l scaling_max_freq

果然被列为-r​​wxrwxrwx。然后,我键入

and sure enough it is listed as -rwxrwxrwx. I then type

echo 124200 > scaling_max_freq

然后

cat scaling_max_freq

可悲的是这个报告,该文件是不变的为1512000。全行执行的回应与任何类型的错误。

sadly this reports that the file is unchanged as "1512000". None of the lines executed responded with any kind of error.

也许省长立即重写呢?也许我需要一些额外类型的权限?也许这是某种根本不允许在Android设备上,我需要通过不同的机制完全控制时钟速度?这个问题必须以某种方式可溶性因为它通过执行SetCPU 。

Maybe the governor is immediately overwriting this? Maybe I need some extra type of permission? Maybe this is somehow fundamentally not allowed on an android device and I need to control the clock speeds via a different mechanism altogether? The problem must be soluable somehow as it it performed by SetCPU.

顺便说一句,这一切都是在一个植根索尼Xperia Z,安卓4.4.2,版本号10.5.A.0.230

BTW, this was all on a rooted Sony xperia z, Android 4.4.2, build number 10.5.A.0.230

推荐答案

有人建议尝试写在scaling_min_freq ......我尝试过了,出乎我的意料,它的工作。当,后来我设置scaling_max_freq和工作太更令我吃惊。我发现这个惊人的,因为这个文件表明,如果有的话,你应该将它们以相反的顺序。

Someone suggested attempting to write to scaling_min_freq... I tried it and to my surprise it worked. I was even more surprised when, afterwards I set scaling_max_freq and that worked too. I found this amazing because this document suggests that if anything you should set them in the reverse order.

总之,这一切似乎是现在的工作。

Anyway, it all seems to be working now.