Diagnosing transient hardware faults, sudden application crashes, mysterious battery drain, and thermal throttling on Android devices requires comprehensive telemetry. While standard Android logcat captures real-time application messages, it lacks critical operating system context—such as kernel memory allocations, radio interface layers (RIL), wake lock retention, and system service state machines.
The Android Debug Bridge (ADB) utility includes a dedicated command designed specifically for deep diagnostics: adb bugreport. This tool extracts an exhaustive, encrypted diagnostic snapshot of the entire Android subsystem, archiving system dumps, crash tombstones, and performance logs into an organised ZIP package suitable for forensic analysis.
Prerequisites: Preparing Your Android Device
Before capturing bug reports via ADB:
- Open Settings on your Android device and navigate to About phone.
- Scroll down and tap Build number seven times until a toast message confirms You are now a developer!
- Return to Settings > System > Developer options.
- Toggle the switch for USB debugging to the On position.
- Connect your Android device to your computer using a certified USB-C cable.
- On your device screen, check Always allow from this computer and tap Allow when the RSA key prompt appears.
Capturing a Full System Bug Report
Open a terminal on your computer (Command Prompt, PowerShell, or macOS/Linux Terminal) and verify device connectivity:
adb devices
To initiate a comprehensive system bug report and save the resulting archive to your current working directory:
adb bugreport bugreport_capture.zip
The capture process typically takes between 1 and 3 minutes as Android queries all system services via dumpstate. A progress percentage displays in your console. Once complete, ADB writes a compressed .zip archive (often 20MB to 50MB in compressed size).
What Is Contained Inside an Android Bug Report ZIP?
Unzipping the generated archive reveals several critical forensic logs and directories:
bugreport-*.txt: The primary system dump file, detailing device hardware specifications, uptime, thermal throttling states, CPU frequencies, process tables, and memory usage.dumpstate_board.txt: Hardware-specific vendor telemetry generated by device chipsets (Qualcomm, MediaTek, Tensor, or Exynos).FS/data/system/dropbox/: DropBoxManager logs containing historical Application Not Responding (ANR) crash traces, native crash tombstones, and watchdog timeout events.FS/data/anr/: Dedicated stack traces detailing thread deadlocks and UI freezes.FS/data/tombstones/: Memory core dumps from native C/C++ library segmentation faults.
Analysing Key Subsystems Within the Bug Report
1. Inspecting Battery Drain and Wake Locks
Search within the primary bugreport-*.txt file for the DUMP OF SERVICE batterystats section:
grep -A 50 "DUMP OF SERVICE batterystats:" bugreport-*.txt
This section quantifies:
- Total power consumed per app (in milliampere-hours, mAh).
- Partial wake locks held while the device screen was turned off.
- Cellular and Wi-Fi radio active scan durations.
2. Investigating Memory Leaks and Low Memory Kills (LMK)
To inspect memory pressure and low memory killer daemon (LMKD) interventions, locate the DUMP OF SERVICE meminfo block:
grep -A 30 "Total PSS by OOM adjustment:" bugreport-*.txt
This categorises process memory consumption from foreground applications down to cached background processes, revealing rogue apps hoarding excessive RAM.
3. Visualising Bug Reports with Google Battery Historian
For deep visual analysis of power consumption and wake locks, Google provides an open-source tool called Battery Historian:
- Launch Battery Historian via Docker on your local workstation:
docker run -p 9999:9999 gcr.io/android-battery-historian/stable:3.0 --port 9999 - Open your browser and navigate to
http://localhost:9999. - Upload your captured
bugreport_capture.ziparchive.
Battery Historian renders an interactive timeline displaying screen states, CPU wakefulness, cellular signal strength, temperature curves, and background job scheduler executions, pinpointing battery anomalies with precision.