A lightweight battery monitoring daemon for Android (Termux) that runs continuously in the background, monitors battery health, temperature, drain, and sends real-time alerts — all from a single compiled binary.
Designed for developers, hackers, and power users who run long Termux sessions and want to protect battery health.
Shows the TUI with battery status, health, trend, and smart advice.

Displays the detailed log entries collected by the daemon.

Example of battery alerts sent as notifications on your phone.

- Runs as a background daemon
- Battery health monitoring (
GOOD, overheating, degradation) - Temperature monitoring with alerts
- High drain detection
- Low battery warnings
- Android notifications via Termux:API
- Simple CLI control:
battery start | stop | status | logs
Compiled binary (no Python needed at runtime)
Android 8+ Termux (F-Droid recommended) Termux:API app (must be installed separately) Notification permission granted to Termux
🚀 Installation (From Source) Copy code Bash
apt install wget jq -y && \
wget https://raw.githubusercontent.com/Frost-bit-star/battery-deamon/main/src/battery -O $PREFIX/bin/battery && \
chmod +x $PREFIX/bin/battery
Install the binary system-wide: Copy code Bash cp dist/battery $PREFIX/bin/battery chmod +x $PREFIX/bin/battery
Before starting (important): Copy code Bash termux-wake-lock Start the daemon: Copy code Bash battery start Check status: Copy code Bash battery status View logs: Copy code Bash battery logs Stop the daemon: Copy code Bash battery stop 🔄 Auto-start on Boot (Optional) Install Termux:Boot from F-Droid Create startup script: Copy code Bash mkdir -p ~/.termux/boot nano ~/.termux/boot/battery.sh Copy code Bash #!/data/data/com.termux/files/usr/bin/bash termux-wake-lock battery start Copy code Bash
chmod +x ~/.termux/boot/battery.sh
Now the daemon starts automatically on device boot. 🧠 What This Tool Can & Cannot Do ✅ Can Monitor battery health Detect overheating Detect abnormal drain Prevent damage during heavy workloads Log battery behavior over time
Repair battery hardware Modify charging voltage Bypass Android power management Control kernel-level battery behavior This tool is monitoring & protection, not hardware modification. 📁 Project Structure
Copy code
battery-daemon/ ├── src/ │ └── battery.py ├── dist/ │ └── battery ├── build.sh ├── README.md └── .gitignore
The build.sh script: Installs all dependencies automatically Installs PyInstaller Builds a single ARM-compatible binary Safe to re-run multiple times
Android may kill background processes without termux-wake-lock Some devices do not expose full battery metrics Notifications depend on Termux permission settings
MIT License Feel free to use, modify, and distribute.
Pull requests are welcome: Performance improvements New alert rules Logging enhancements Packaging for Termux
Termux Termux:API Android open battery interfaces 📢 Disclaimer This software is provided as-is, without warranty. Use at your own risk. Battery data accuracy depends on device manufacturer implementation.