Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine Android GPU Clock?

Tags:

android

gpu

It is possible to dynamically query an Android device for the current CPU clock similar to what is mentioned in what follows.

adb shell "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq"

However, it seems like there is not a similar option for GPU. I was wondering if there is a way, anything, to do the same for GPUs. Any help is greatly appreciated.

(CPU/GPU frequencies are not good indicators of speed. I mainly need them for some study on DVFS)

like image 743
MTMD Avatar asked May 10 '26 02:05

MTMD


1 Answers

How I found the GPU freq and % for Android Galaxy S5 on OSX/Linux

  1. Attach your phone for debugging.
  2. In terminal: ./adb -s shell dumpsys SurfaceFlinger
  3. Find the line with "GLES:"
  4. The GPU name is there. For the galaxy s5 it is "Mali-T628"
  5. ./adb shell find "/sys/" -type f
  6. Search through and find the "mali" folder
  7. use adb shell cat to investigate what the files contain
  8. Used ./adb shell cat /sys/devices/11800000.mali/utilization, which lists the gpu used % as an integer
  9. Used ./adb shell cat /sys/devices/11800000.mali/clock, which lists the gpu freq as an integer
  10. Use those integers in your perf reporting
like image 66
Josh Graham Avatar answered May 12 '26 18:05

Josh Graham



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!