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

相关推荐
拭心10 小时前
Google 提供的 Android 端上大模型组件:MediaPipe LLM 介绍
android
带电的小王12 小时前
WhisperKit: Android 端测试 Whisper -- Android手机(Qualcomm GPU)部署音频大模型
android·智能手机·whisper·qualcomm
梦想平凡12 小时前
PHP 微信棋牌开发全解析:高级教程
android·数据库·oracle
元争栈道13 小时前
webview和H5来实现的android短视频(短剧)音视频播放依赖控件
android·音视频
阿甘知识库14 小时前
宝塔面板跨服务器数据同步教程:双机备份零停机
android·运维·服务器·备份·同步·宝塔面板·建站
元争栈道14 小时前
webview+H5来实现的android短视频(短剧)音视频播放依赖控件资源
android·音视频
MuYe14 小时前
Android Hook - 动态加载so库
android
居居飒15 小时前
Android学习(四)-Kotlin编程语言-for循环
android·学习·kotlin
Henry_He18 小时前
桌面列表小部件不能点击的问题分析
android
工程师老罗18 小时前
Android笔试面试题AI答之Android基础(1)
android