cpu常用命令

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

相关推荐
Dnelic-2 小时前
【单元测试】【Android】JUnit 4 和 JUnit 5 的差异记录
android·junit·单元测试·android studio·自学笔记
Eastsea.Chen4 小时前
MTK Android12 user版本MtkLogger
android·framework
长亭外的少年11 小时前
Kotlin 编译失败问题及解决方案:从守护进程到 Gradle 配置
android·开发语言·kotlin
建群新人小猿14 小时前
会员等级经验问题
android·开发语言·前端·javascript·php
1024小神15 小时前
tauri2.0版本开发苹果ios和安卓android应用,环境搭建和最后编译为apk
android·ios·tauri
兰琛15 小时前
20241121 android中树结构列表(使用recyclerView实现)
android·gitee
Y多了个想法16 小时前
RK3568 android11 适配敦泰触摸屏 FocalTech-ft5526
android·rk3568·触摸屏·tp·敦泰·focaltech·ft5526
NotesChapter17 小时前
Android吸顶效果,并有着ViewPager左右切换
android
_祝你今天愉快18 小时前
分析android :The binary version of its metadata is 1.8.0, expected version is 1.5.
android
暮志未晚Webgl18 小时前
109. UE5 GAS RPG 实现检查点的存档功能
android·java·ue5