How to Inspect Flash Storage Health and Disk IO Wear on Android Using ADB dumpsys storaged

Modern Android smartphones and embedded IoT devices rely on NAND flash memory—typically Universal Flash Storage (UFS) or Embedded MultiMediaCard (eMMC)—to store operating system images, application code, and user data. Because flash memory cells have a finite write endurance, aggressive background disk writes by rogue background services can rapidly degrade hardware lifespans and lead to I/O bottlenecks. The native Android storage daemon, storaged, continuously logs drive health parameters, wear-out percentages, per-UID disk I/O metrics, and daily storage trim operations. Developers and system engineers can query these telemetry streams directly through Android Debug Bridge (ADB).

Understanding Android storaged Telemetry Architecture

The storaged system service runs as a low-level native daemon (UID root / system) that directly communicates with kernel sysfs interfaces and hardware controller health descriptors:

  • JEDEC / UFS Health Descriptors: Android queries hardware health reports exposed by the storage controller, including Device Life Time Estimation A (SLC cache blocks) and Device Life Time Estimation B (TLC/QLC main storage).
  • Per-UID Disk I/O Accounting: The daemon records bytes read and written for each running Linux user identifier (UID), separating foreground interactive tasks from unprompted background disk operations.
  • Periodic and Manual fstrim: Tracks when Android’s periodic block discard (TRIM) operations execute to reclaim unused flash blocks and maintain flash controller garbage collection efficiency.

Connecting to ADB and Querying storaged

Ensure that USB debugging or Wireless debugging is enabled under Developer Options on the target Android device. Verify connectivity from your terminal:

# Check connected Android devices
adb devices

# Query the full storaged system dump
adb shell dumpsys storaged

The resulting output contains structured sections covering drive life estimation, disk performance history, per-UID statistics, and recent storage events.

Inspecting Flash Storage Life Time Estimation and Wear

Flash memory degrades as cells undergo program-erase (P/E) cycles. The storaged output extracts hardware life estimations directly from the UFS/eMMC controller registers:

# Filter output to inspect device life time estimation
adb shell dumpsys storaged | grep -i -A 10 "storage life"

The output reports standardized health values defined by JEDEC specifications:

Life Estimation Value Wear-Out Status Operational Interpretation
0x01 0% – 10% device life time used Storage hardware is new or in optimal condition.
0x02 – 0x05 10% – 50% device life time used Normal operational aging; high endurance remaining.
0x07 – 0x09 70% – 90% device life time used Significant flash wear; heavy historical writes.
0x0A 90% – 100% device life time used Warning threshold: flash memory nearing end of rated endurance.
0x0B Exceeded maximum life time Critical failure imminent; read-only fallback mode likely.

If Device Life Time Estimation B reads 0x0A or 0x0B, the physical NAND flash has exhausted its rated endurance, explaining system latency, filesystem corruption, or spontaneous reboot loops.

Monitoring Per-UID Disk I/O Consumption

One of the primary causes of premature flash degradation is poorly optimized applications writing multi-gigabyte cache databases continuously in the background. storaged tracks disk activity per UID, differentiating between foreground and background I/O:

# Extract per-UID disk I/O metrics
adb shell dumpsys storaged | grep -A 25 "UID"

The columns display disk throughput separated into operational modes:

  • fg_read: Bytes read while the application was active and in the foreground.
  • fg_write: Bytes written while the application was in the foreground.
  • bg_read: Background disk reads performed without user interaction.
  • bg_write: Background disk writes performed while the app was asleep or backgrounded.

To identify the specific package associated with an offending UID that has accumulated excessive bg_write values, resolve the UID against the package manager:

# Map UID 10245 to its corresponding Android package name
adb shell cmd package list packages --uid 10245

Auditing Storage Trim (fstrim) Operations

NAND flash requires regular TRIM operations to inform the controller which blocks no longer contain valid filesystem data. Android executes fstrim automatically during idle maintenance windows while connected to a charger. Inspect recent trim logs:

# Check recent trim history
adb shell dumpsys storaged | grep -i -A 5 "trim"

If the device has not performed a trim in weeks—often due to never being left connected to power overnight—you can trigger an immediate manual trim across all mounted filesystems:

# Trigger an immediate manual filesystem trim
adb shell sm fstrim

Exporting Real-Time Disk I/O History

For automated benchmarking or CI/CD test automation, you can request storaged to dump raw performance records covering recent 10-minute, 1-hour, and daily intervals:

# Dump raw storage performance history
adb shell dumpsys storaged --hours

# Dump per-UID storage records formatted for script parsing
adb shell dumpsys storaged --task

Inspecting storage telemetry via adb shell dumpsys storaged provides developers and hardware engineers with absolute visibility into flash endurance, pinpointing rogue background write loops and protecting device longevity.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.