1. 程式人生 > >Android中CPU頻率檢視和修改

Android中CPU頻率檢視和修改

adb shell "echo 0 > /proc/hps/enabled" (關閉cpu hotplug)
adb shell "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" (固定最高頻)
echo 1 > /sys/devices/system/cpu/cpuX/online
X表示(0~3,不同平臺CPU core 數是不一樣的)
例:6735平臺
[email protected]:/ # echo 1 >sys/devices/system/cpu/cpu1/online
echo 1 >sys/devices/system/cpu/cpu1/online

[email protected]:/ # echo 1 >sys/devices/system/cpu/cpu2/online
echo 1 >sys/devices/system/cpu/cpu2/online
[email protected]:/ # echo 1 >sys/devices/system/cpu/cpu3/online
echo 1 >sys/devices/system/cpu/cpu3/online

6、設定頻率(可以先cat 出來當前的頻率有哪些)
C:\Users\mtk71247>adb shell "cat /proc/cpufreq/cpufreq_ptpod_freq_volt"

[0] = { .cpufreq_khz = 1300000, .cpufreq_volt = 113750, .cpufreq_volt_org = 1250
00, },
[1] = { .cpufreq_khz = 1235000, .cpufreq_volt = 110000, .cpufreq_volt_org = 1231
25, },
[2] = { .cpufreq_khz = 1170000, .cpufreq_volt = 106250, .cpufreq_volt_org = 1206
25, },
[3] = { .cpufreq_khz = 1040000, .cpufreq_volt = 98750,  .cpufreq_volt_org = 1150

00, },
[4] = { .cpufreq_khz = 819000,  .cpufreq_volt = 95000,  .cpufreq_volt_org = 1100
00, },
[5] = { .cpufreq_khz = 598000,  .cpufreq_volt = 95000,  .cpufreq_volt_org = 1050
00, },
[6] = { .cpufreq_khz = 442000,  .cpufreq_volt = 95000,  .cpufreq_volt_org = 1000
00, },
[7] = { .cpufreq_khz = 299000,  .cpufreq_volt = 95000,  .cpufreq_volt_org = 9500
0, },