1.平台信息
读节点
adb shell "cat proc/cpuinfo"
读属性
adb shell getprop ro.hardware
2.负载信息
负载信息
adb shell dumpsys cpuinfo
3.原生定频
频率档位
adb shell "cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies"
当前频率
adb shell "cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq"
固定频率
定最高频,设置为性能模式
4,4+4,4+3+1
adb shell "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" # 第0簇
adb shell "echo performance > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor" # 第1簇
adb shell "echo performance > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor" # 第2簇
2+6
adb shell "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" # 第0簇
adb shell "echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor" # 第1簇
定最低频,设置为省电模式
4,4+4,4+3+1
adb shell "echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" # 第0簇
adb shell "echo powersave > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor" # 第1簇
adb shell "echo powersave > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor" # 第2簇
2+6
adb shell "echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" # 第0簇
adb shell "echo powersave > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor" # 第1簇
指定频率
4,4+4,4+3+1
adb shell "echo [your freq] > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq"
adb shell "echo [your freq] > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"
adb shell "echo [your freq] > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq"
adb shell "echo [your freq] > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq"
adb shell "echo [your freq] > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq"
adb shell "echo [your freq] > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq"
2+6
adb shell "echo [your freq] > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq"
adb shell "echo [your freq] > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"
adb shell "echo [your freq] > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq"
adb shell "echo [your freq] > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq"
4.mtk定频1簇
MT6739/MT6761
频率档位
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_oppidx"
当前频率
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_freq"
固定频率
指定频率
X = -1, 0 ~ 15,0 最大,-1无限制
adb shell "echo X > /proc/ppm/policy/ut_fix_freq_idx"
定最高频
adb shell "echo 0 > /proc/ppm/policy/ut_fix_freq_idx"
定最低频
adb shell "echo 15 > /proc/ppm/policy/ut_fix_freq_idx"
5.mtk定频2簇
MT6762/MT6877/MT6833...
频率档位
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_L/cpufreq_oppidx"
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_oppidx"
当前频率
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_L/cpufreq_freq"
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_freq"
固定频率
指定频率
X = -1, 0 ~ 15,0 最大,-1无限制
Y = -1, 0 ~ 15,0 最大,-1无限制
adb shell "echo X Y > /proc/ppm/policy/ut_fix_freq_idx"
定最高频
adb shell "echo 0 0 > /proc/ppm/policy/ut_fix_freq_idx"
定最低频
adb shell "echo 15 15 > /proc/ppm/policy/ut_fix_freq_idx"
5.mtk定频3簇
MT6893...
频率档位
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_B/cpufreq_oppidx" # 大核
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_L/cpufreq_oppidx" # 中核
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_oppidx" # 小核
当前频率
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_B/cpufreq_freq"
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_L/cpufreq_freq"
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_freq"
固定频率
指定频率
X = -1, 0 ~ 15,0 最大,-1无限制
Y = -1, 0 ~ 15,0 最大,-1无限制
Z = -1, 0 ~ 15,0 最大,-1无限制
adb shell "echo X Y Z > /proc/ppm/policy/ut_fix_freq_idx"
定最高频
adb shell "echo 0 0 0 > /proc/ppm/policy/ut_fix_freq_idx"
定最低频
adb shell "echo 15 15 15 > /proc/ppm/policy/ut_fix_freq_idx"
MT6983/MT6895...
频率档位
adb shell "cat /proc/cpuhvfs/C0_opp_idx" # 大核
adb shell "cat /proc/cpuhvfs/C1_opp_idx" # 中核
adb shell "cat /proc/cpuhvfs/C2_opp_idx" # 小核
查看频率和定频用原生的
6.MTK开核
root
adb root
开核,有多少簇,写几个数字
X = -1, 0 ~ 4. Core for cluster 0,-1 无限制
Y = -1, 0 ~ 4. Core fot cluster 1,-1 无限制
Z = -1, 0 ~ 4. Core fot cluster 2,-1 无限制
adb shell "echo X Y Z > /proc/ppm/policy/ut_fix_core_num"
adb shell "echo 4 > /proc/ppm/policy/ut_fix_core_num" # 1簇,4核
adb shell "echo 4 4 > /proc/ppm/policy/ut_fix_core_num" # 2簇,8核
adb shell "echo 2 6 > /proc/ppm/policy/ut_fix_core_num" # 2簇,8核
adb shell "echo 4 3 1 > /proc/ppm/policy/ut_fix_core_num" # 3簇,8核
7.MTK策略
root
adb root
关闭PPM,要开核或定频,需要关闭
adb shell "echo 0 > /proc/ppm/enabled"
打开PPM
adb shell "echo 1 > /proc/ppm/enabled"
验证是否生效,enabled是开,disable是关
adb shell "cat /proc/ppm/enabled"
关闭FPSGO
≥ Android 11(R)
adb shell "echo 0 > /sys/kernel/fpsgo/common/fpsgo_enable"
< Android 11
adb shell "echo 0 > /sys/kernel/debug/fpsgo/common/force_onoff"
关闭触摸提频
adb shell "echo 0 > /proc/perfmgr/tchbst/kernel/tb_enable"
参考:https://confluence.tclking.com/pages/viewpage.action?pageId=183437108