Get GPU temperature in Android

3.9k views Asked by At

I'm developing an Android application to manage GPU temperature. In the same way I read CPU temperatura (/sys/devices/virtual/thermal/thermal_zone0/temp) I was searching something to get the temperature for GPU in Android but coouldn't find anything.

My question is: It is possible get temperature from GPU in Android?

If it is possible, where can I find the file which have this information?

Thanks.

3

There are 3 answers

0
vivekjindal20 On BEST ANSWER

"/sys/class/thermal/thermal_zone10/temp"

Took me a lot of time to figure out because I was unable to find any help online regarding this.

I was able to find out that sensor10 belongs to GPU but I am unable to find that file again which contains the value because digging is too deep and complicated.

0
Papa Hong On

Obtain the device owner permission of the app with https://www.sisik.eu/blog/android/dev-admin/device-health-monitoring And utilize "hardwarePropertiesManager.getDeviceTemperatures(HardwarePropertiesManager.DEVICE_TEMPERATURE_GPU, HardwarePropertiesManager.TEMPERATURE_CURRENT)" to get GPU temperature.

0
Guest On

In system/etc/ you'll find a thermal configuration file that might show which sensor is used to measure the gpu temperature.

In my case oneplus-one it's also "/sys/class/thermal/thermal_zone10/temp"