如何在Android设备上读取CPU频率 [英] How to read cpu frequency on android device

查看:125
本文介绍了如何在Android设备上读取CPU频率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何 Java API?我如何才能阅读这些信息.

Is there any Java API for that? How can I read this information.

推荐答案

要在 Android 上有频率,只需阅读/sys 目录中的这些特殊文件:

To have frequency on Android, just read these special files in /sys directory:

#cat "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq"
#cat "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq"
#cat "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"

您将拥有当前、最小和最大频率允许.

You will have current, min and max Frequency allowed.

这篇关于如何在Android设备上读取CPU频率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆