How to read cpu frequency on android device

michael picture michael · Jun 11, 2010 · Viewed 50.3k times · Source

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

Answer

Ellis picture Ellis · Sep 24, 2010

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.