GCPU โ Android Task Manager
Tech Talk
**desc->GCPU** is a cutting-edge Android Task Manager, empowering users with real-time insights into their device's CPU, GPU, and task activity. It provides a comprehensive overview of system performance and resource consumption.
๐ Key Features & Performance Monitoring
Real-time CPU Usage
Monitors overall and per-core CPU utilization by parsing data from /proc/stat
and dumpsys cpuinfo
.
Dynamic GPU Metrics
Integrates with **Snapdragon Profiler** via sdpcli
to collect and display crucial GPU performance metrics.
Active Process Monitoring
Lists all running system processes with their respective CPU, memory, and battery consumption.
Resource Usage Alerts
Monitors battery statistics and provides configurable alerts for high CPU/GPU usage to optimize device longevity.
// Example of parsing CPU usage from /proc/stat
fun readCpuStats(): Map<String, Long> {
val procStat = File("/proc/stat").readText()
val lines = procStat.split("\n")
val cpuLine = lines[0].substringAfter("cpu ")
val cpuTimes = cpuLine.trim().split(" ").map { it.toLong() }
return mapOf(
"user" to cpuTimes[0],
"nice" to cpuTimes[1],
"system" to cpuTimes[2]
)
}
fun readCpuStats(): Map<String, Long> {
val procStat = File("/proc/stat").readText()
val lines = procStat.split("\n")
val cpuLine = lines[0].substringAfter("cpu ")
val cpuTimes = cpuLine.trim().split(" ").map { it.toLong() }
return mapOf(
"user" to cpuTimes[0],
"nice" to cpuTimes[1],
"system" to cpuTimes[2]
)
}
๐ Technology Stack
Framework
Kotlin
Jetpack Compose
Material Design 3
Performance Tools
ADB Shell
Snapdragon Profiler (via sdpcli
)
/proc/stat
& dumpsys cpuinfo
parsing
Architecture & Data
Jetpack DataStore (preferences)
Compose Navigation
Real-time data streams
Optimization
Optimized for **Android SDK 35**
Responsive UI
Efficient resource parsing
โจ Differentiating Features
- Smart Toggles: Enable/disable GPU tracking on demand for optimal resource management.
- User-Friendly UI: Presents complex system data in a compact, intuitive, and accessible interface adhering to Material3 guidelines.
- Deep Dive Metrics: Provides granular CPU data from low-level system files and `dumpsys`.
- Actionable Insights: Highlights CPU/GPU-accelerated programs and background processes, aiding user investigation and performance tuning.
- Persistent Settings: Utilizes Jetpack DataStore to save user preferences and alert configurations seamlessly.