Benjamin-Loison / android

0 stars 0 forks source link

Monitor battery temperature as got warning prompt on Xiaomi Mi A3 #68

Open Benjamin-Loison opened 4 months ago

Benjamin-Loison commented 4 months ago

image

image

image

image

image

image

image

image

image

Benjamin-Loison commented 4 months ago
termux-battery-status
{
  "health": "GOOD",
  "percentage": 80,
  "plugged": "UNPLUGGED",
  "status": "DISCHARGING",
  "temperature": 37.900001525878906,
  "current": 522003
}
Benjamin-Loison commented 4 months ago
pkg install jq
Checking availability of current mirror:
[*] https://termux.mentality.rip/termux-main: ok
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  jq
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 196 kB of archives.
After this operation, 799 kB of additional disk space will be used.
Get:1 https://termux.mentality.rip/termux-main stable/main aarch64 jq aarch64 1.7.1 [196 kB]
Fetched 196 kB in 1s (387 kB/s)
Selecting previously unselected package jq.
(Reading database ... 28603 files and directories currently installed.)
Preparing to unpack .../archives/jq_1.7.1_aarch64.deb ...
Unpacking jq (1.7.1) ...
Setting up jq (1.7.1) ...
Processing triggers for man (1.14.6-1) ...
Benjamin-Loison commented 4 months ago
clear
while [ 1 ]
do
    date
    termux-battery-status | jq .temperature
    sleep 1
done

https://wiki.termux.com/wiki/Termux-battery-status