Skip to content
KernelSU Modules

CRecord Evolution

Immutable release Synced

在 root 管理器的模块描述里实时显示电池健康度,内置 WebUI 估算曲线,刷入即用、零配置。 | Real-time battery health in your root manager's module description, with a built-in WebUI — flash and go, zero configuration.

Description

🔋 ChargingRecord Evolution

Battery health written right into your root manager's module description — flash and go, zero configuration

Release Downloads Go Platform License

English | 简体中文(中文说明)

中文用户请阅读 README_ZH.md(Chinese users: see the Chinese documentation)。

Features | Screenshots | Installation | How it works | FAQ | Build from source | Acknowledgements


Screenshots

The three WebUI pages (Overview / History / Settings) at a glance. The battery data in the screenshots is fabricated demo data, used only to illustrate the UI — it does not represent any real device or any measured result.

Overview History · Records History · Trends Settings
Overview page History records History trends Settings page

Features

  • Module description: two lines with kernel/measured health and capacity, cycles and temperature; labels trim on narrow screens instead of wrapping.
  • Overview: health, measured capacity, resistance and confidence; while charging it also shows live current, power, voltage, session progress and time to full.
  • History: filter by 7/30/90 days and by charge/discharge, page through the timeline, and read each record's current level and session change as a SOC bar; trend charts take point taps, and the day-by-day capacity archive is kept permanently.
  • Cross-checked estimates: kernel full charge, mid-stretch calibration, discharge differential and settled sessions each produce a value; a wide spread is flagged as questionable.
  • Degradation trend: when the trend is significant, shows the weekly loss and "about N months to 80%"; hidden while the data is insufficient.
  • WebUI: floating pill or Material 3 bottom bar, swipe paging, collapsing header; light/dark themes, AMOLED black, manager palette and bilingual UI.
  • Fully offline: no network permission, no telemetry; data is written only to data/battery.db.
  • Manager support: Magisk v20.4+ / KernelSU / APatch / MMRL, arm64 only; upgrades keep the previous learning history.

Installation

Requires Magisk v20.4+, KernelSU, or APatch (arm64 only). Download from Releases:

Asset Channel Notes
CRecordEvolution-*.zip Stable Statistical algorithm, supports in-app updates
CRecordEvolution_ML-*.zip Experimental Online-learning algorithm, manual flash only

Flashing

Pick the zip in your manager. First installs, normal upgrades and reinstalls of the same build proceed without extra prompts — the manager already asks for its own confirmation. The installer only asks for a volume-key confirmation when it detects a downgrade or a stable ↔ ML channel switch, and shows the installed vs incoming version/channel first (Volume Up = continue, Volume Down = cancel, 30 s timeout = cancel). The UI language follows the phone language automatically. Reboot when done.

If you flashed the wrong build but have not rebooted yet, simply flash the correct zip again: the wrong binary never starts, so you still only reboot once.

Notes

  • Both variants share the same id and name and are mutually exclusive; the ML build is marked by the -ML suffix in the module Version field (and by the asset name), so the module description matches the stable build.
  • Upgrades keep the data/battery.db learning history (the installer copies the old data); uninstall the old module (id Charging_Record) first when coming from that version.
  • Reboot soon after upgrading: until then the old daemon keeps writing with the old units, and Settings shows "Updated — restart to apply"; older Magisk versions have no Action button, so wait for the reboot.
  • The language follows the system (or the previous choice) and can be switched in the WebUI; the module description refreshes immediately.
  • Only KernelSU / APatch / MMRL can open the module WebUI (Magisk only flashes it); the bottom bar toggles between a floating pill and the classic style, and chart points can be tapped for exact values.
  • Bypass charging is recorded too: when the status stays Full but the fuel gauge is actually dropping, the discharge session follows the gauge direction; a segment with no reported % drop only accumulates usage and produces no history row.
  • Duplicate sessions left by an old multi-daemon install are cleaned automatically, and their charging energy is deducted from the lifetime total; float-charge segments that never became sessions can still leave it slightly high. Capacity estimates are not affected.
  • If automatic design-capacity arbitration does not fit your device, set it with batteryd design set <mAh>; design clear restores automatic detection.

How it works

The numbers in the description come from two independent paths: one reads the kernel fuel gauge, the other back-calculates from the charging process.

How it works: sampling → four settlement paths (with session gates and quality check) → aggregation → output

Why it works this way

  • No indefinite integration: a coulomb counter would keep accumulating error; re-deriving the capacity on every charge is like re-syncing a clock.
  • Partial sessions are unreliable: their derived capacity tends to run high (up to 10% in measured data), so only large-swing sessions are accepted.
  • The mid stretch is more trustworthy, and the discharge differential is the steadiest: the top few percentage points often report full early, while percentages in the middle hold up better; the discharge differential never goes through current_now and integrates inside the chip.

Capacity trend

Three states: progress until 21 days of data; "no significant change" when no clear movement can be measured; and a weekly loss only once real degradation sets in. A healthy battery staying at "no significant change" is normal — short-term noise is usually larger than real degradation.

Extra observations

Observations only, never affecting health: resting voltage, constant-current charge time and the incremental-capacity main peak; they show as collecting when data is insufficient — not a fault.

Current units and calibration

current_now is not consistent in practice: some kernels report mA while charge_* stays in µAh, and a wrong dimension scales the charge input by 1000×. The module first normalises by the dimension of charge_full, then at every charge-session settlement back-derives the current scale from "fuel-gauge differential vs the integral of raw current readings" and persists it; all later readings are converted with that scale, surviving reboots. Everything is automatic — the Settings → "Data" section shows the active scale. Devices without a charge_counter node have no reference and keep the dimension-based initial guess.

Warning

Known inaccuracies:

  • Using the phone while charging can count load current as charge input, so readings run high; screen-off charging is the most accurate (prolonged high-load use after reaching full is detected and stopped);
  • Devices without cycle_count have that field omitted; a design capacity that disagrees with the fuel gauge is cross-checked against the device tree (see "Design capacity" below).

Design capacity

Health is measured full-charge capacity ÷ design capacity, so both sides must use the same basis. Some vivo/iQOO dual-cell kernels put the battery label capacity (e.g. 4508 mAh at the label voltage) into charge_full_design, while charge_full / charge_counter report the single-cell charge of the series pack (e.g. 3220 mAh) — dividing them puts a healthy battery at ~60%. The module therefore cross-checks the sysfs value against the vivo,bat-capacity-mah device-tree property (same basis as the fuel gauge) and, when the two disagree by more than 20%, keeps the one closer to the measured full charge; a value that would imply more than 110% health is rejected. The chosen number feeds the health percentage, the plausible-capacity window, the cycle equivalent and the "weeks to 80%" projection.

If both sources are wrong for your device, set the correct single-cell design capacity (mAh) from the command line (or write it to data/design_mah); run design clear to go back to automatic detection:

# use 3220 mAh as the (single-cell) design capacity
/data/adb/modules/CRecordEvolution/bin/batteryd design set 3220
# remove the override and go back to automatic detection
/data/adb/modules/CRecordEvolution/bin/batteryd design clear

Run batteryd once (or reboot) after changing it to refresh the module description and health values.

batteryd diag prints which source was used (design=src=…).

FAQ

Is a health reading above 100% a sign of something broken?

No. Factory-rated capacity is generally conservative, so the actual full-charge capacity often exceeds the design value.

How is this different from AccuBattery?

The idea is similar — both integrate charge. The difference is that this module uses root to read the kernel fuel gauge directly: no persistent notification, no network permission, and no dependency on Android's battery stats API.

How long until I see a measured estimate?

A few days of normal use gets you the first number; the ML build needs 30 valid sessions before it starts to diverge.

Will upgrading the module lose my learning history?

No. The flash script copies the old version's data/ directory (including battery.db) into the new version, so estimate records and cycle history are preserved intact.

Build from source

The WebUI source lives in webui/ (Preact + Vite) and builds into webroot/ (generated, not committed); the Go daemon is pure Go (SQLite via modernc.org/sqlite, no CGO needed):

pnpm install --frozen-lockfile
pnpm run verify   # build + offline scan + 50KB gzip ceiling

go test ./... -count=1
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags "-s -w" -o bin/batteryd ./cmd/batteryd

bin/batteryd is the native executable shipped in the module: once refreshes the description and prints the current readings (what the manager's Action button runs), json emits the Overview/Settings snapshot, history emits the paged History data, and diag emits a redacted diagnostics summary (Settings → "Copy diagnostics"). On boot service.sh starts batteryd daemon; see AGENTS.md for the full release flow.

Research

Papers consulted during design (PDF library in docs/):

  • He & Shin, ACM e-Energy '23 — resting-voltage fingerprinting
  • Severson et al., Nature Energy 2019 and follow-ups — capacity fade prediction
  • Lin et al., Energy 2022 — constant-current charge time (CCCT)
  • Fly & Chen 2020, MDPI Energies 2024 review — incremental capacity analysis (ICA)
  • arXiv 2410.06422 — probabilistic ML uncertainty quantification
  • Zhang et al., ICCK 2025 — coulomb-counter accumulation error

Adoption varies: Lin 2022 (CCCT) and He & Shin (resting voltage) are the method prototypes adopted directly, with parameters recalibrated against this device's data; the rest served as motivation and background reading. The core capacity back-calculation is a standard engineering practice and does not depend on the papers above.

The ± shown by the ML build is an RLS relative-uncertainty indicator, not a strict statistical confidence interval.

Contributing

Issues and pull requests are welcome. Read CONTRIBUTING.md for the local build/test commands and commit style, report vulnerabilities privately as described in SECURITY.md, and follow the CODE_OF_CONDUCT.md.

When reporting a battery or estimate issue, attach the redacted batteryd diag output (Settings → Copy diagnostics) instead of screenshots only.

Contributors

ChargingRecord Evolution is built by the following contributors (in no particular order):

f1owkang hcnk3HrzQe

Acknowledgements

  • Design concept: 不会梦游的鱼
  • Install script: 酷安@阿巴酱

If you like the project, PRs and stars are welcome ⭐

Disclaimer

  • Health, capacity and cycle figures are estimates derived from kernel readings and the charging process; they are not guaranteed to match factory ratings or professional test equipment.
  • Flashing this module modifies your system's module directory — proceed at your own risk, and only after you understand how to flash and roll back with Magisk / KernelSU / APatch.
  • Nothing here constitutes repair or safety advice; for swelling, abnormal heat or other battery faults, rely on the manufacturer's diagnostics.
  • All data stays in the local data/battery.db; the module makes no network requests and never uploads or collects anything.

License

This project is licensed under GPL-2.0.


Made with ❤ by f1owkang

Releases

1.4.0

Latest CRecord Evolution v1.4.0

Version code 40 v1.4.0

Download
  • chore: 提升版本至 1.4.0(40)
  • docs: 简化特性并同步记录条与注意事项
  • feat(webui): 记录页 SOC 条与摘要设置项精简
  • fix(battery): 重复清理按被删会话扣回充入
  • feat(battery): 设计容量支持 design 子命令覆盖
  • fix(battery): 设计容量口径按设备树与实测锚裁决
  • fix(webui): 取色主题对宿主调色板做对比度纠偏
  • docs: 同步重复清理与旁路放电约定
  • feat(battery): 满电旁路放电按电量计方向记账
  • fix(battery): 重复记录清理改为可重跑并展示结果
  • fix(battery): 守护进程单实例并清理重复记录

CRecordEvolution_ML-40-1.4.0.zip 为实验通道(在线学习算法),手动刷入,不提供应用内更新。

Assets 1

CRecordEvolution-40-1.4.0.zip 3.0 MiB

SHA-256 62d72c1b2e696889e735a923f388492849f23d5b64137b678713266133d49a03 · Attestations

1.3.10

CRecord Evolution v1.3.10

Version code 39 v1.3.10

Download
  • chore: 发布 1.3.10(39)
  • docs: 同步长期容量档案与摘要统计约定
  • ci(webui): 引入 vitest 覆盖派生模型并接入 CI
  • feat(ui): 历史页长期档案与充入统计、概览终点预测
  • feat(battery): 新增长期容量档案与衰减终点预测
  • docs(ui): 更新顶栏标题轨道与阴影分层说明及截图
  • test(ui): 覆盖顶栏标题跟随、淡出与折叠可见性
  • feat(ui): 顶栏标题改为随页滑动的三标题轨道
  • docs(ui): 记录底栏弹簧切页与触摸事件约定
  • test(ui): 补充触摸点按与底栏拖动回归
  • fix(ui): 修复底栏点按并改用 Miuix 弹簧切页
  • docs(ui): 更新横向切页与底栏拖动说明及截图
  • feat(ui): 改为横向 pager 并支持底栏拖动切页
  • fix(ui): 修复取色主题状态栏色同步
  • feat(ui): 展示名改为 CRecord Evolution
  • feat(ui): 顶栏折叠、Material Symbols 与滚动性能优化
  • docs: ML 通道改由 Version 后缀标识
  • feat(battery): ML 通道标识移到 module.prop 版本后缀
  • docs: 安装确认风险分级与刷错版本恢复说明
  • feat(installer): 安装确认改为降级与跨通道风险分级
  • docs: 英文首页与安装、主题约定同步
  • feat(ui): 新增 AMOLED、管理器取色与 Material 3 传统底栏
  • feat(installer): 安装器移除语言选择并跟随系统语言

CRecordEvolution_ML-39-1.3.10.zip 为实验通道(在线学习算法),手动刷入,不提供应用内更新。

Assets 1

CRecordEvolution-39-1.3.10.zip 3.0 MiB

SHA-256 faf4efb9bdc1e94961bad215c24ae587c98b4d919f957bdbdecda1d476d9e8e8 · Attestations

1.3.8

ChargingRecord Evolution v1.3.8

Version code 37 v1.3.8

Download
  • chore: 发布 1.3.8(37)
  • docs: 同步实时数据、历史页与元数据约定
  • add: README 截图脚本与重新生成的界面截图
  • ci: 新增元数据守卫并过滤自动化提交
  • docs: 清理代码注释中的实测与过程叙事
  • feat(webui): 概览充电实时卡、历史页状态与无障碍修整
  • feat(battery): 概览实时数据与守护进程心跳
  • docs: 同步两行状态卡约定、README 与模块初始描述
  • feat(battery): 模块描述改两行状态卡并按宽度自适应
  • fix(calib): charge_counter 单位归一,修复 mAh 机型估算始终 learning
  • docs: 统一项目叫法并压缩 AGENTS.md

CRecordEvolution_ML-37-1.3.8.zip 为实验通道(在线学习算法),手动刷入,不提供应用内更新。

Assets 1

CRecordEvolution-37-1.3.8.zip 3.0 MiB

SHA-256 fb4ed1326c9c670a032621ce2e10af2552d48743e0e76a3a88e0cee6e82c96f7 · Attestations

1.3.7

ChargingRecord Evolution v1.3.7

Version code 36 v1.3.7

Download
  • chore(git): .release-baseline 固定 LF
  • chore: 发布 1.3.7(36)
  • feat(webui): 概览温度行与趋势图点按读数,修正高亮圈裁切和双重分割线
  • feat(battery): 校准会话回填样本与 ICA 基准,互检口径加时效
  • fix(release): 更新日志基线改用 .release-baseline 并在发版后回写
  • docs: 同步校准重算、安装器排版与趋势图约定
  • fix(ui): 概览估算趋势图与趋势拟合共用窗口
  • fix(installer): 语言选择改为中英双语分行
  • fix(calib): 学到刻度时重算本会话积分与倍率
  • docs: 精简 README 并同步校准/安装器说明
  • fix(installer): 语言选择步固定中英双语输出
  • fix(calib): 放宽电流刻度吸附容差并记录异常比值
  • fix(stats): 会话总数与 SOC 区间语义
  • ci(actions): 升级到 Node 24 运行时的 action 版本
  • chore(issue): 精简反馈模板字段
  • chore(issue): 添加问题反馈与功能建议模板
  • docs: 同步校准、诊断与安装说明
  • fix(installer): 精简安装交互并修复按键抬起误触发
  • feat(webui): 设置页诊断复制与关于页改版
  • feat(battery): 自校准电流刻度并新增脱敏诊断
  • refactor(webui): 修复轮询去重并拆解百行函数
  • refactor(go): 泛型化 SQL 扫描并拆解超长函数
  • refactor(webui): 抽取数与偏好 hook 并拆分概览
  • refactor(webui): 组件改为 JSX 并拆分历史页
  • chore(tooling): 引入 Prettier 与格式化/CI 守卫
  • refactor(go): 统一微单位命名并补充 Go CI
  • feat(webui): 迁移到 Preact + Vite 构建
  • docs: 补充 WebUI 截图与工作原理流程图
  • design: 重绘为亮色电池健康脉冲图标
  • add: update.json 更新至 v1.3.6

CRecordEvolution_ML-36-1.3.7.zip 为实验通道(在线学习算法),手动刷入,不提供应用内更新。

Assets 1

CRecordEvolution-36-1.3.7.zip 3.0 MiB

SHA-256 2656dbf881c9658bc0e791ee57af23c4a46aac50025be2470e6d7a4bd012b1cc · Attestations

1.3.6

ChargingRecord Evolution v1.3.6

Version code 35 v1.3.6

Download
  • chore: 发布 1.3.6(35)
  • docs: 更新双语文档、历史/WebUI 说明与模块摘要
  • feat: 中英双语、Preact 三页 WebUI 与完整历史页
  • chore: 统一脚本 LF 换行并忽略本地构建产物

CRecordEvolution_ML-35-1.3.6.zip 为实验通道(在线学习算法),手动刷入,不提供应用内更新。

Assets 1

CRecordEvolution-35-1.3.6.zip 2.9 MiB

SHA-256 ee84ea24f3d679c5d27b417ebe927a85819c031879752acdc009b1fe846f74db · Attestations

1.3.5

ChargingRecord Evolution v1.3.5

Version code 29 v1.3.5

Download
  • chore: 发布 1.3.5(29)
  • feat: 描述行并列内核/实测健康,WebUI 补退避与平滑曲线
  • fix: 中段校准跳过无 cc 旧行,修正系统性偏低 366mAh
  • feat: 补齐 KernelSU Modules 上架元数据与发布前预检
  • docs: 作者改为仓库贡献者并修订 README
  • fix: 补齐 KernelSU Modules 预检查要求
  • add: update.json 更新至 v1.3.4

CRecordEvolution_ML-29-1.3.5.zip 为实验通道(在线学习算法),手动刷入,不提供应用内更新。

Assets 1

CRecordEvolution-29-1.3.5.zip 2.9 MiB

SHA-256 171b3d2025e9bcde3d06a320647d23f8eb4bbe9ce48c66e96bebd88a378a5b7f · Attestations

Transparency

Tag
v1.4.0 Immutable release
Tag commit
1e310c2e4ae9
Content commit
2ab2305ccf02
SHA-256
62d72c1b2e696889e735a923f388492849f23d5b64137b678713266133d49a03
Last change synced

Verify it yourself

KernelSU Modules does not sign or audit modules. The SHA-256 only proves the download matches this index. Verify the release yourself with the GitHub CLI:

gh release verify v1.4.0 -R f1owkang/CRecordEvolution
gh release verify-asset v1.4.0 CRecordEvolution-40-1.4.0.zip -R f1owkang/CRecordEvolution