I have seen numerous questions / answers showing how to get temperature information from an Android device - using this approach:
int zoneNumber = 0;
String temperatureFileLocation = "sys/devices/virtual/thermal/thermal_zone" + zoneNumber + "/temp";
File temperatureFile = new File(temperatureFileLocation);
scanner = new Scanner(temperatureFile);
double temperatureC = scanner.nextFloat();
...
scanner.close();
I was not sure what for each zone (i.e. what part of the device the sensor is in), but I just found that there is also a file describing the type of each zone - for example:
String zoneTypeFileLocation = "sys/devices/virtual/thermal/thermal_zone" + zoneNumber + "/type"; // NB - that "/type" not "/temp" !
Now, using Scannerfor reading in what type each zone is, I return the values this way:
mtktswmt
mtktscpu
mtktspmic
mtktspa
mtktsabb
mtktsbattery
tsen_max
sec-fuelguage
Can someone explain which locations / components all these zone names really mean?
(Ideally, I would like to get the temperature of an NFC device device.)
source
share