Sensor Type TYPE_TEMPERATURE has been deprecated [since Android 2.3] probably which was giving info about CPU temperature. Now we have Sensor Type TYPE_AMBIENT_TEMPERATURE which will provide us room temperature (none of my use, & btw not all devices&/Android versions support it)
I checked few apps which measures CPU temperature. Probably they're reading system files. I tried locating, in some devices I'm able to locate it inside following path:
sys/devices/virtual/thermal/thermal_zone0/temp
The structure bit varies from vendor to vendor & also the unit of measurement. fine! But in many devices I'm simply unable to locate any such files & in same devices those apps work! I wonder, how!
How can we measure CPU temperature in Android?
I've used the following path:
sys/class/hwmon/hwmonX/temp1_input
that works on the most phones