Check battery level through SSH

Is there a way to check battery life of the pinephone through SSH with some command?

upower is a possibility.

Use the following to get the battery device name

upower -e

Then use the following command (replace $BAT with your actual device)

upower -i /org/freedesktop/UPower/devices/$BAT

Or you could try combining to one command - something like

upower -i $(upower -e | grep 'battery_')
1 Like

You can run this command to get the current charge percentage:

cat /sys/class/power_supply/axp20x-battery/capacity
2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.