Every Android battery tool tells you what is draining the battery. Battery Historian tells you a wakelock was held for two hours. Android Profiler tells you the radio never slept. None of them tell you why. Why is not a pattern-matching problem. It is a reasoning problem: understanding how one architectural decision — a repeating alarm registered in MainActivity.onCreate() — propagates through six layers of a codebase to become a drain that only shows up on a physical device. A linter sees the last line of that chain and stops. EcoTrace is a desktop application for Android engineers that answers two questions for every source of drain: what the code is doing wrong, and which architectural decision put it there. It runs 23 energy detectors over Java and Kotlin sources — wakefulness, network, location and lifecycle patterns including unclosed WakeLocks, postDelayed polling loops, sub-30-second GPS intervals, and JobInfo constraints written but never submitted. It then builds a real cross-file call graph and walks backwards from each finding to the lifecycle entry point that caused it. A leaked wakelock in NetworkManager is reported as the symptom of a wakeup alarm in MainActivity that re-arms the path 96 times a day. The whole repository is ingested into IBM Bob 2.0, which holds every file in a single reasoning pass. Bob revises severities, corrects descriptions, and writes a fix against the specific traced chain — including for defects the local pass attributes to the wrong method. Bob proposes a patch; EcoTrace's own detectors re-run over it. A patch that silences a rule by deleting the construct is rejected. Accepted changes land on a branch for a human to merge, never straight to main. For teams with devices, adb shell dumpsys batterystats snapshots are parsed and differenced into a measured drain rate in mAh/min, attributed to the app under test rather than the whole device. Three things make it unlike the tools judges have seen: First, it reasons about cause, not symptoms — the call graph is the product. Second, it is honest about provenance — every number reports where it came from: measured, estimator-derived, or unknown. Third, it works without a key — the 23 detectors, chains, grade, history and report all run offline, deterministically and free. Bob makes the analysis sharper; it is never a prerequisite. A tool that only works when you hand it an API key is a demo, not a product. Output is a self-contained HTML or PDF report that attaches to the ticket, plus an optional one-click patch authored, verified and branched for review.
Category tags: