Starting March 27, 2025, we recommend using android-latest-release instead of aosp-main to build and contribute to AOSP. For more information, see Changes to AOSP.

Capture traces

You can capture traces on the device, through Winscope, or through Android Debug Bridge (ADB) commands.

In Winscope, you can retrieve the most recently collected traces from a device during the previous session. This feature is especially helpful when facing connection issues, such as using ADB over Wi-Fi, or when Winscope closes unexpectedly. If there are no traces from the last session, Winscope displays No valid trace files found.

Error messages

Winscope shows the following messages during trace collection:

Message Description
No trace targets selected No trace checkboxes are selected.
Errors occurred during tracing:
ERROR: INVALID_LAYER_STACK, please check your display state (must be on at start of trace)
A screen recording was requested, but the display was off at the start of trace.
Errors occurred during tracing:
A specific error message received from adb command, such as Failed to find valid files for <trace types requested>
adb couldn't read the trace files, which typically happens when adb isn't running as root.
Errors occurred during tracing: Tracing time out There's a connection issue with the device.
Errors occurred during tracing: {inner error} This message covers all other errors.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025年12月02日 UTC.