extracting-logs-with-logcat

Community

Get actionable device logs fast with logcat.

Authorskydoves
Version1.0.0
Installs0

System Documentation

What problem does it solve?

When an Android test fails on CI or only reproduces on-device, you need the right device logs to pinpoint what happened without drowning in irrelevant output.

Core Features & Use Cases

  • Stream or snapshot logs: Use adb logcat for live streaming or adb logcat -d to dump and exit for CI artifacts.
  • Target the correct buffer and severity: Select buffers like main, system, and crash, then filter by tag/priority using expressions such as MyApp:D *:S.
  • Make logs machine- and CI-friendly: Use structured formats (-v json on Android 11+), time/PID filters (-T, -t, --pid), and rotation/persistence flags (-f, -r, -n, -G, -g), plus an R8 rule to strip Log.d in release builds.
  • Use cases: Reproduce-and-dump on failure, isolate system/crash issues, debug “missing logs” via buffer sizing, and prevent sensitive debug logging from shipping.

Quick Start

Run: adb logcat -c && ./run-scenario.sh && adb logcat -d -b crash -v threadtime > artifacts/crash.txt

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: extracting-logs-with-logcat
Download link: https://github.com/skydoves/android-testing-skills/archive/main.zip#extracting-logs-with-logcat

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.