To change the cpu freq, first make sure the governor is “userspace”.
check it under the /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
# echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
It also shows the available governor in ‘scaling_available_governors’
Then modify the ‘scaling_setspeed’
# echo 900000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
run a cpu hungry app, monitor the cpuinfo_cur_freq and scaling_setspeed.
By test, it works on Nexus 4, while failed on Galaxy S4.