Adb logcat reader

From modbender/skill-library-mcp · View interactive version

Adb logcat reader is an AI agent skill from the GitHub repository modbender/skill-library-mcp. Android device logcat reader for real-time log monitoring. Use when working with pywayne.adb.logcat_reader module to read Android device logs via adb logcat command, supporting both C++ backend (faster) and Python backend (subprocess) with generator-style output for streaming logs.

How to use this skill

Skill file

Pywayne ADB Logcat Reader

This module provides real-time Android device log reading capabilities via the adb logcat command.

Quick Start

from pywayne.adb.logcat_reader import AdbLogcatReader

# Create reader (default C++ backend)
reader = AdbLogcatReader()

# Start log capture and read
reader.start()
for line in reader.read():
    print(line)

Use Python backend (alternative)

reader = AdbLogcatReader(backend='python')

reader.start()

for line in reader.read():

print(line)


# Stop and cleanup
reader.stop()

Initialization

# C++ backend (default, faster)
reader = AdbLogcatReader()

# Python backend (alternative, may be more compatible)
reader = AdbLogcatReader(backend='python')

Reading Logs

The read() method yields log lines incrementally as a generator, suitable for processing large logs or real-time monitoring.

# Process logs as they arrive
for line in reader.read():
    # Filter, parse, store...

Properties

| Property | Description |

|---------|-------------|

| backend | 'cpp' or 'python' | Active backend for adb logcat |

| running | Whether logcat process is running |

Methods

| Method | Description |

|---------|-------------|

| start() | Start adb logcat process |

| read() | Generator yielding log lines |

| stop() | Stop logcat process |

| get_backend() | Get active backend type |

Backends

C++ Backend (Default)

Python Backend (Alternative)

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.