Battery Monitor
2.0.0 · GitHub
More about this app
Track and log battery capacity and parameters over time using Shizuku
Battery Monitor
](https://github.com/tswistak/Battery-Monitor/releases/latest)
[
](https://f-droid.org/packages/codes.swistak.batterymonitor/)
Battery Monitor is a practical Android app for checking battery status, following battery history and setting battery alarms.
See current readings and time estimates, review charging and discharging over time, and keep battery information visible in notifications and widgets.
Highlights
- Current battery readings and approximate charging/discharging time estimates
- Interactive measurement history and fullscreen comparison of two metrics
- Configurable battery alarms with multiple thresholds
- Persistent notification and Live Updates on supported Android 16+ devices
- Configurable home screen widgets
- CSV/JSON history export and backup/restore
- Optional advanced information through root or Shizuku
- Local processing of monitoring data
Features
Current State and Time Estimates
- Battery level, charging status and power source, temperature, voltage, current and remaining charge, where available
- Battery-side power calculated from voltage and current
- Approximate charging/discharging estimates with configurable targets and an alternative full-range estimate where applicable
- A recent battery-level trend
Readings depend on the device and the data Android makes available. Android-reported battery health is a status, not a capacity-health percentage or a measurement of degradation.
History and Logs
- Battery events and periodic measurements
- Charts for level, temperature, voltage, current, power and remaining charge
- Time ranges, event filtering, interactive charts and a fullscreen view comparing up to two metrics
- CSV/JSON export and import, with choices to add imported history or replace existing history
- CSV/JSON export for a selected range, everything, or logs since the last manual export, including append to a compatible existing file; automatic CSV/JSON exports to a chosen folder, as new files or appended to an existing file
Main Notification
- Persistent battery information with configurable content and expanded details
- Optional Live Updates on Android 16+ with compatible system behavior and settings
Notification presentation, including status bar indicators, depends on Android and the device.
Battery Alarms
- Full-charge alarms and rising/falling battery-level thresholds
- High/low temperature and Android-reported health alarms
- Charging/discharging target alarms
- Multiple thresholds for threshold-based alarm types
Targets support estimates and alarms; Battery Monitor does not set a hardware charging cutoff. Alarm sounds and notification channels are configured through Android settings.
Widgets
- Status, Measurements and Trend widgets with per-widget appearance and content settings
- Classic Circle and Full variants remain available
- Add and configure widgets through your launcher's widget workflow
Backup and Restore
- General backups include settings, alarms, history and predictor data
- Save backups to user-selected files and choose which categories to restore
- Add restored history to existing records or replace them
Appearance and Advanced Information
- Light, dark and true-black appearance, with dynamic colors on supported devices
- Optional additional readings through root or Shizuku, plus diagnostic information
Requires Android 8.0/API 26 or newer. Optional readings, manufacturer-specific charging-limit detection and Live Updates depend on the device and Android version. Root and Shizuku are not required for ordinary monitoring.
Privacy
Battery and device information is processed locally. Device-provided fields can include identifiers such as a battery serial number, where available. Battery Monitor does not send monitoring data to external servers. Files you export or share may contain device information.
Project Background
This project is a fork of Battery Indicator Pro / BatteryBot Pro, with continued development and rebranding.
The goal of the fork is to maintain and enhance battery monitoring for modern Android versions. Check CHANGELOG for details on changes and updates.
Thanks to the original authors and contributors.
Development
Use Android Studio for development.
Build
./gradlew assembleDebug
Tests
JVM tests protect decision logic and backup/migration compatibility. Run them without an emulator:
./gradlew :app:testDebugUnitTest
Ordinary instrumented tests protect real Android storage and UI behavior. With a dedicated Android runtime running:
./gradlew :app:connectedDebugAndroidTest
Use JDK 21. The instrumented command uses AndroidJUnitRunner and excludes the separate Appium E2E suite. JVM reports are under app/build/reports/tests/; Android reports are under app/build/reports/androidTests/.
E2E test guide covers emulator setup, fresh-build execution, fixture inputs, reports and GitHub Actions.
Profiling guide covers isolated profiling builds, benchmark execution, supporting traces and local analysis.
License
GNU GPL v3.0-or-later.
See LICENSE.
Release signing
GitHub APK releases since version 1.7.0 are signed with OpenPGP.
Fingerprint: 4A5C 1BDE 7687 85AD 68F2 C4F0 99B6 89A2 66FF 1B8B
Public key: docs/release-signing-key.asc.
How Shizuku is used
Can show advanced battery diagnostics and improve live current and charging limit readings via `dumpsys battery`, `cmd battery get` and sysfs commands through Shizuku.
This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.
How this app uses Shizuku
Shizuku is used to read protected battery, power supply and system setting data that normal apps cannot reach, powering detailed diagnostics and more reliable live readings.
- Show advanced battery details: the advanced stats view shows charge counter, current, energy counter, capacity, health, cycle count, full and design capacity, charging current and voltage limits, charging policy and state, plus raw service and power supply values, collected with
dumpsys battery,cmd battery getand sysfscatandlscommands through Shizuku. - Show battery identity metadata: manufacturing date, first use date, serial number, part status, manufacturer, model name, minimum design voltage, health and remaining charge time are shown from privileged battery APIs when available.
- Improve live current readings: the main current display falls back to privileged
cmd battery getand sysfs results for current now and average when standard system and direct file reads give no value. - Improve live monitoring: ongoing level, status, temperature, voltage and remaining charge updates use the privileged snapshot to fill missing fields during background monitoring.
- Detect charging protection limits: OEM charging limit state is detected by reading system settings with
settings get, Lineage settings with acontent query, and power supply nodes with privilegedcatwhen direct reads fail. - Diagnose charging support: the diagnostics report gathers
settings list,getprop, system package listings and power supply node discovery through Shizuku to explain device support and adapter state.
Android APIs or commands used
dumpsys batterycmd battery get charge_countercmd battery get current_nowcmd battery get current_averagecmd battery get energy_countercmd battery get -f current_nowcmd battery get -f current_averagels /sys/class/power_supplycat /sys/class/power_supply/*/*find -L /sys/class/power_supply -mindepth 2 -maxdepth 2 -type fsettings get securesettings get globalsettings get systemsettings list securesettings list globalsettings list systemcontent query --uri content://lineagesettings/system/ --projection valuegetproppm list packages -sidandroid.content.Context.getSystemService(Context.BATTERY_SERVICE)android.os.BatteryManager.getIntPropertyandroid.os.BatteryManager.getLongPropertyandroid.os.BatteryManager.getStringPropertyandroid.os.BatteryManager.computeChargeTimeRemaining
Notable details
If privileged access is unavailable, the advanced stats view shows a no access status instead of values, while live current, monitoring and charging limit features continue with standard system readings and direct file access where possible.
Changelog
What's new for version 2.0.0
New
- New UI based on Material Design (#44 and all sub-issues).
- Charts in history view (#62).
- Diagnostics screen for detailed stats, instead of an Advanced tab (#48).
- New, configurable widgets (#8, #16, #17).
- Battery power measurement (#158).
Improved
- Possibility to change app theme, including true black for AMOLED screens (#55).
- Using system color palette on supported Android versions (#55).
- Redesigned and simplified alarms (#26, #24).
- Searchable settings (#50).
- Accessibility.
Fixed
- Expandable details for Live Updates (#165).
Permissions
10 permissions requested
Sources
2 sources
Sources
2 sources