android-perfetto-capture

Capture Perfetto traces from Android devices into .perfetto-trace files.

7|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/himattm/skills --skill android-perfetto-capture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-perfetto-capture
Source: https://github.com/himattm/skills/tree/main/plugins/android/skills/android-perfetto-capture
Command: npx skills add https://github.com/himattm/skills --skill android-perfetto-capture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill captures Perfetto traces from a connected Android device to enable timing, threading, and jank investigations. It outputs a self-contained .perfetto-trace file that downstream skills (android-perfetto-analyze, android-trace-sections) read with trace_processor.

Core Features & Use Cases

  • Capture strategies: one-shot host script, on-device long-running, and in-app start/stop.
  • Generates a .perfetto-trace file on the host or device for subsequent analysis with trace_processor and related tools.
  • Use cases include diagnosing animation jank, cold-start latency, and scroll performance, and validating main-thread scheduling.

Quick Start

Run the default one-shot host script to capture a trace and save it to /tmp/trace.perfetto-trace.

Frequently Asked Questions about android-perfetto-capture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I capture a Perfetto trace from an Android device to investigate frame drops?

To capture a Perfetto trace for frame drops, run a one-shot host script that connects to your Android device and saves a .perfetto-trace file. This file records timing and threading data needed to diagnose jank and scroll performance issues.

What is the best way to record Android system traces for startup latency analysis?

Recording Android system traces for startup latency is best done using Perfetto capture strategies like one-shot host scripts or on-device long-running captures. These methods generate a self-contained .perfetto-trace file for downstream timing and threading analysis.

Can I use Perfetto on-device long-running capture for continuous Android profiling?

Yes, Perfetto supports on-device long-running capture for continuous Android profiling. This strategy allows you to record extended trace data directly on the device, outputting a .perfetto-trace file that can be analyzed later with trace_processor.

Does Perfetto trace capture work with trace_processor for main-thread scheduling validation?

Perfetto trace capture works directly with trace_processor for main-thread scheduling validation. The capture process outputs a .perfetto-trace file that trace_processor reads to analyze timing, threading, and scheduling data from the Android device.

When do I need a Perfetto trace to diagnose scroll performance and animation jank?

You need a Perfetto trace to diagnose scroll performance and animation jank when you require detailed timing and threading data from the Android system. The captured .perfetto-trace file enables end-to-end analysis of frame drops and main-thread scheduling issues.

What are the limitations of using a one-shot host script for Android Perfetto trace capture?

A one-shot host script for Android Perfetto trace capture is limited to capturing traces during a specific recording window on a connected device. For continuous background profiling, you must use the on-device long-running or in-app start/stop capture strategies instead.