Documentation
¶
Overview ¶
Query battery health from the system battery properties service.
Uses IBatteryPropertiesRegistrar via the "batteryproperties" service to query battery properties via raw binder transact. Falls back to reading sysfs if binder access is denied.
Build:
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o build/battery_health ./examples/battery_health/ adb push battery_health /data/local/tmp/ && adb shell /data/local/tmp/battery_health
Click to show internal directories.
Click to hide internal directories.