Last active
March 24, 2023 13:48
-
-
Save ifarbod/eb08dad0a8813fbff1df22455d3ae6be to your computer and use it in GitHub Desktop.
Print thermal sensor name and values.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
for i in range(0, 95): | |
print(f"#{i}") | |
subprocess.run(f"adb shell cat /sys/class/thermal/thermal_zone{i}/type") | |
temp = int(subprocess.run(f"adb shell cat /sys/class/thermal/thermal_zone{i}/temp", capture_output=True).stdout.decode("utf-8")) | |
print(temp / 1000) |
Author
ifarbod
commented
Mar 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment