extracting-logs-with-logcat

Installation
SKILL.md

Extracting Logs With logcat — Reading Device Logs

This skill covers adb logcat end-to-end: streaming vs dumping, buffer selection, filter expressions, format flags, PID and time filters, file rotation, and the R8 rule that strips Log.d from release builds. The companion CI capture-on-failure pattern lives in ../../automation/scripting-adb-for-ci/SKILL.md.

When to use this skill

  • A test fails on CI; the developer needs to dump the device log into the artefact archive.
  • The developer's adb logcat | grep MyApp is overwhelming the SSH session — the logcat-side filter is the fix.
  • A scenario only reproduces inside system_server or crash buffers, not the default main.
  • The developer wants structured logs (-v json) for machine ingestion.
  • A Log.d("Sensitive", "...") call appears to leak in release — the R8 -assumenosideeffects rule is missing.
  • Logs disappear after the app is killed by Doze/ANR — --pid plus a re-resolution loop is needed.

When NOT to use this skill

  • Capturing a screenshot or video. Use ../../capture/capturing-screenshots-and-screenrecord/SKILL.md.
  • Pulling a generic file from the device. Use ../../transfer/extracting-test-artifacts/SKILL.md.
  • The whole script — retries, port forwarding, parallel device fan-out. Use ../../automation/scripting-adb-for-ci/SKILL.md.
  • Driving gestures or settings changes. Use ../../control/injecting-input-and-state/SKILL.md.
Installs
47
GitHub Stars
319
First Seen
May 16, 2026
extracting-logs-with-logcat — skydoves/android-testing-skills