Skip to content

Instantly share code, notes, and snippets.

@gndu91
Forked from corneliusroemer/temperature.sh
Last active July 21, 2021 00:11
Show Gist options
  • Save gndu91/a7364225b6109f65af7e61ad215b1c61 to your computer and use it in GitHub Desktop.
Save gndu91/a7364225b6109f65af7e61ad215b1c61 to your computer and use it in GitHub Desktop.
Get list and temperature of CPU and battery temperature sensors via Android Debug Bridge
#run from terminal with: adb shell "$(cat temperature.sh)" to get list of temperature sensors and their temperature
#on Android devices
for VARIABLE in $(seq 1 80)
do
cat /sys/devices/virtual/thermal/thermal_zone$VARIABLE/type
cat /sys/devices/virtual/thermal/thermal_zone$VARIABLE/temp
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment