Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
/sys/devices/virtual/thermal/thermal_zone0/temp shows 37°C (37000 millicelcius) no matter what the actual temperature is. The device is Moto G32, Android 12, not rooted. Using cat on Termux to view the temperature.
Welcome to Android Enthusiasts. There is a similar question that may help: How do I get the temperature of my phone via ADB?. While the question mentioned ADB, the underlying command dumpsys thermalservice should be able to be called directly from Termux. Let us know if it helps. Otherwise, is there a requirement to get the value from that folder specifically?
While following the advice of Andrew make sure you give Termux the DUMP permission to access dumps from system services and then call dumpsys by its absolute path. Here's how: adb shell pm grant com.termux android.permission.dump; Then in your Termux environment, run /system/bin/dumpsys thermalservice
dumpsys thermalservice
should be able to be called directly from Termux. Let us know if it helps. Otherwise, is there a requirement to get the value from that folder specifically?adb shell pm grant com.termux android.permission.dump
; Then in your Termux environment, run/system/bin/dumpsys thermalservice