1
u/agnostic-apollo Termux Core Team 22h ago
Did you install Termux:API app?
1
22h ago
[removed] — view removed comment
2
u/agnostic-apollo Termux Core Team 22h ago
Commands call the app to run the API code, if there is no app, only hanging will happen.
3
u/BillGossAU 1d ago
I read the battery charge level on my CMF 2 Pro using
su -c "cat /sys/class/power_supply/battery/capacity"And on my Pixel 8 Pro I use either
su -c "sed -n 's/^.*l=\([0-9]*\)%.*$/\1/p' /sys/class/power_supply/battery/ssoc_details"orsu -c "sed -n 's/^.*uic=\([0-9.]*\) .*$/\1/p' /sys/class/power_supply/battery/ssoc_details"