Lightweight Detection of Abnormal Battery Drain Induced by Network Operations of Mobile Apps
Abstract: Abnormal Battery Drain (ABD) is a significant yet often elusive issue for mobile apps, frequently arising from subtle network-related inefficiencies, such as redundant data transmissions or retry loops. Existing research includes static and dynamic detection methodologies, but both struggle to detect such ABDs at runtime, especially when they are triggered by network operations without direct user interaction. We present NetDrain, a lightweight runtime anomaly detection framework designed to identify and diagnose network-induced ABDs in mobile apps. NetDrain leverages thread-level CPU and network performance event counters, extracts time- and frequency-domain features, and applies an unsupervised data-driven model to detect deviations in hardware resource usage patterns. To facilitate root cause analysis, our framework correlates anomalies with specific threads and functions via circular callgraph sampling. Our evaluation shows that NetDrain successfully detects network-induced ABDs for 22 real-world apps and locates their root causes in the app code, outperforming prior research such as eDelta and eDoctor.
Loading