capturing-screenshots-and-screenrecord
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCapturing Screenshots and screenrecord — Visual Artefacts For Tests
捕获截图与 screenrecord — 用于测试的可视化制品
This skill covers grabbing PNG screenshots and MP4 screen recordings from a device through , plus the JUnit4 TestWatcher pattern for capturing on test failure. It does not cover Android Studio's screenshot tool, Compose , or third-party streaming tools (scrcpy/Vysor).
adbcaptureToImage()此 skill 介绍如何通过 从设备获取 PNG 截图和 MP4 屏幕录制,以及如何使用 JUnit4 TestWatcher 模式在测试失败时捕获相关制品。它不涵盖 Android Studio 的截图工具、Compose 或第三方流式工具(scrcpy/Vysor)。
adbcaptureToImage()When to use this skill
何时使用此 skill
- A flaky CI test needs a screenshot at the moment of failure plus a logcat dump.
- The team generates golden screenshots from a reference device for visual regression.
- QA needs to record a 30 s repro of a bug for a bug report attachment.
- The dev's produces a corrupt file — the missing
adb shell screencap /sdcard/out.pngflag wrote raw RGBA, not PNG.-p - A Windows CI agent receives screenshots with CRLF corruption — the fix is .
adb exec-out screencap -p
- 某个不稳定的 CI 测试需要在失败瞬间截取屏幕,并同时转储 logcat。
- 团队从参考设备生成黄金截图,用于视觉回归。
- QA 需要录制一段 30 秒的缺陷复现视频,作为缺陷报告附件。
- 开发人员执行 后生成了损坏文件——缺少
adb shell screencap /sdcard/out.png标志会写入原始 RGBA 数据,而不是 PNG。-p - Windows CI 代理收到的截图存在 CRLF 损坏——修复方法是 。
adb exec-out screencap -p
When NOT to use this skill
何时不应使用此 skill
- Compose-level screenshot tests using / Roborazzi / Paparazzi. Those are unit-test mechanisms and live under the Compose set, not ADB.
captureToImage() - Continuous live mirroring of the device (presentations, demos). Use scrcpy or Vysor — cannot stream.
screenrecord - Driving the device first (taps, key events). Use .
../../control/injecting-input-and-state/SKILL.md - Pulling files generally (not screenshots). Use .
../../transfer/extracting-test-artifacts/SKILL.md
- 使用 、Roborazzi 或 Paparazzi 的 Compose 级截图测试。这些是单元测试机制,属于 Compose 集合而非 ADB。
captureToImage() - 持续实时镜像设备(展示、演示)。请使用 scrcpy 或 Vysor——无法进行流式传输。
screenrecord - 驱动设备(点击、按键事件)。请使用 。
../../control/injecting-input-and-state/SKILL.md - 常规文件拉取(不是截图)。请使用 。
../../transfer/extracting-test-artifacts/SKILL.md
Prerequisites
前置条件
- returns
adb get-state. Seedevice.../../devices/connecting-to-devices/SKILL.md - For : device API 19+ (Android 4.4) —
screenrecordwas added in KitKat.screenrecord - For + Wear OS: not supported. The utility refuses (developer.android.com/tools/adb#screenrecord).
screenrecord - For writes on API 30+: scoped-storage rules apply; the
/sdcard/user retains FUSE/sdcardfs access, but app-private writes route throughshell./sdcard/Android/data/<pkg>/
- 返回
adb get-state。请参阅device。../../devices/connecting-to-devices/SKILL.md - 对于 :设备需为 API 19+(Android 4.4)——
screenrecord是在 KitKat 中加入的。screenrecord - + Wear OS:不支持。该工具会拒绝执行(developer.android.com/tools/adb#screenrecord)。
screenrecord - 对于 API 30+ 上的 写入:适用作用域存储规则;
/sdcard/用户仍保留 FUSE/sdcardfs 访问权限,但应用私有写入需通过shell路由。/sdcard/Android/data/<pkg>/
screencap
— PNG screenshots
screencapscreencap
— PNG 截图
screencap"Thecommand is a shell utility for taking a screenshot of a device display." — developer.android.com/tools/adb#screencapscreencap
screencap [-h] [-p] [-d <displayId>] [<path-on-device>]| Flag | Meaning |
|---|---|
| (no flag) | Writes raw RGBA framebuffer to file. Not a PNG. |
| Encode as PNG. Required when streaming to stdout for the host. |
| Capture a specific logical display (multi-display devices). |
| Help. |
Three idiomatic invocations:
bash
undefined“命令是一个用于截取设备显示屏的 shell 工具。” — developer.android.com/tools/adb#screencapscreencap
screencap [-h] [-p] [-d <displayId>] [<path-on-device>]| 标志 | 含义 |
|---|---|
| (无标志) | 将原始 RGBA 帧缓冲区写入文件。不是 PNG。 |
| 编码为 PNG。流式传输到宿主机标准输出时必须使用。 |
| 捕获指定的逻辑显示屏(多显示屏设备)。 |
| 帮助。 |
三种惯用调用方式:
bash
undefined1. Save to device, then pull (good when the test continues running).
1. Save to device, then pull (good when the test continues running).
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png ./screen.png
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png ./screen.png
2. Stream PNG bytes back to host without an intermediate file.
2. Stream PNG bytes back to host without an intermediate file.
adb exec-out screencap -p > screen.png
adb exec-out screencap -p > screen.png
3. Multi-display capture: external display + main.
3. Multi-display capture: external display + main.
adb shell screencap -p -d 0 /sdcard/main.png
adb shell screencap -p -d 1 /sdcard/external.png
undefinedadb shell screencap -p -d 0 /sdcard/main.png
adb shell screencap -p -d 1 /sdcard/external.png
undefinedexec-out
vs shell
— the binary-clean trap
exec-outshellexec-out
与 shell
对比——二进制安全陷阱
exec-outshelladb shell\n\r\nadb exec-outRecipe — never use for the streaming variant on Windows. Always:
adb shell screencap -p > out.pngbash
adb exec-out screencap -p > out.pngFor files written on the device first and pulled afterwards, the issue does not apply ( is binary-clean).
adb pulladb shell\n\r\nadb exec-out命令模板——在 Windows 上进行流式捕获时,绝不要使用 。始终使用:
adb shell screencap -p > out.pngbash
adb exec-out screencap -p > out.png对于先在设备上写入文件、随后再拉取的情况,此问题不适用( 是二进制安全的)。
adb pullscreenrecord
— MP4 screen recording
screenrecordscreenrecord
— MP4 屏幕录制
screenrecord"Thecommand is a shell utility for recording the display of devices running Android 4.4 (API level 19) and higher. The utility records screen activity to an MPEG-4 file." — developer.android.com/tools/adb#screenrecordscreenrecord
screenrecord [--size WIDTHxHEIGHT] [--bit-rate RATE] [--time-limit TIME]
[--rotate] [--bugreport] [--verbose] <path-on-device>| Flag | Verbatim meaning (developer.android.com/tools/adb#screenrecord) |
|---|---|
| "Display command syntax and options". |
| "Set the video size. The default value is the device's native display resolution (if supported), 1280x720 if not." |
| "Set the video bit rate for the video, in megabits per second. The default value is 20Mbps." |
| "Set the maximum recording time, in seconds. The default and maximum value is 180 (3 minutes)." |
| "Rotate the output 90 degrees. This feature is experimental." |
| Embeds a textual frame info / timestamp overlay used by bug-report attachments. |
| "Display log information on the command-line screen." |
“命令是一个 shell 工具,用于录制运行 Android 4.4(API 级别 19)及更高版本的设备的显示屏。该工具会将屏幕活动录制为 MPEG-4 文件。” — developer.android.com/tools/adb#screenrecordscreenrecord
screenrecord [--size WIDTHxHEIGHT] [--bit-rate RATE] [--time-limit TIME]
[--rotate] [--bugreport] [--verbose] <path-on-device>| 标志 | 原文含义(developer.android.com/tools/adb#screenrecord) |
|---|---|
| “显示命令语法和选项”。 |
| “设置视频尺寸。默认值为设备的原生显示屏分辨率(如果支持),否则为 1280x720。” |
| “设置视频的比特率,单位为 Mbps。默认值为 20Mbps。” |
| “设置最大录制时间,单位为秒。默认值和最大值为 180(3 分钟)。” |
| “将输出旋转 90 度。此功能仍处于实验阶段。” |
| 嵌入供缺陷报告附件使用的文本帧信息/时间戳叠加层。 |
| “在命令行屏幕上显示日志信息。” |
Hard limits (verbatim)
硬性限制(原文)
- "Audio is not recorded with the video file."
- "Video recording is not available for devices running Wear OS."
- "Some devices might not be able to record at their native display resolution. If you encounter problems with screen recording, try using a lower screen resolution."
- "Rotation of the screen during recording is not supported."
- The default and maximum time limit is 180 s. To capture longer scenarios, chain multiple invocations and concatenate post-hoc, or use scrcpy.
- “视频文件不录制音频。”
- “运行 Wear OS 的设备无法使用视频录制。”
- “某些设备可能无法以其原生显示屏分辨率录制。如果遇到屏幕录制问题,请尝试使用更低的屏幕分辨率。”
- “录制期间不支持屏幕旋转。”
- 默认和最大时间限制均为 180 秒。要捕获更长的场景,请串联多次调用并在事后合并,或者使用 scrcpy。
No streaming flag — the limitation
不支持流式传输——该限制
screenrecordscreenrecordscreenrecordscreenrecordOutput paths
输出路径
| Path | When |
|---|---|
| Default. User-visible video. Scoped-storage rules apply on API 30+ but |
| Use when the test app must produce output before the SD card is mounted, or to avoid touching the public store. Always pullable by |
| 路径 | 使用时机 |
|---|---|
| 默认路径。用户可见视频。API 30+ 适用作用域存储规则,但 |
| 当测试应用必须在 SD 卡挂载前生成输出,或为避免写入公共存储区时使用。始终可由 |
Stopping early
提前停止
screenrecord--time-limitbash
adb shell screenrecord --time-limit 180 /sdcard/run.mp4 &
REC=$!screenrecord--time-limitbash
adb shell screenrecord --time-limit 180 /sdcard/run.mp4 &
REC=$!… run instrumentation; on failure, send SIGINT to the on-device process …
… run instrumentation; on failure, send SIGINT to the on-device process …
adb shell pkill -INT screenrecord
wait $REC
adb pull /sdcard/run.mp4 ./run.mp4
undefinedadb shell pkill -INT screenrecord
wait $REC
adb pull /sdcard/run.mp4 ./run.mp4
undefined--bugreport
overlay
--bugreport--bugreport
叠加层
--bugreport--bugreportadb logcat -v threadtime,year,UTC../../observability/extracting-logs-with-logcat/SKILL.md--bugreportadb logcat -v threadtime,year,UTC../../observability/extracting-logs-with-logcat/SKILL.mdCapture-on-failure pattern (JUnit4 TestWatcher)
失败时捕获模式(JUnit4 TestWatcher)
The standard pattern: a or fires on test failure, runs + , and pulls the artefacts to a per-test directory.
TestRuleTestWatcherfailed()screencaplogcat -dkotlin
class CaptureOnFailureRule(private val outputDir: File) : TestWatcher() {
override fun failed(e: Throwable, description: Description) {
val testName = "${description.className}.${description.methodName}"
val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
val target = File(outputDir, testName).apply { mkdirs() }
// PNG screenshot
device.executeShellCommand("screencap -p /sdcard/fail.png")
device.executeShellCommand("logcat -d -v threadtime").let { log ->
File(target, "logcat.txt").writeText(log)
}
// The test process can pull /sdcard/fail.png via Context.getExternalFilesDir
// or push through TestStorageService — see ../../transfer/extracting-test-artifacts/SKILL.md.
}
}Host-side equivalent in a CI script (see for the full version):
../../automation/scripting-adb-for-ci/SKILL.mdbash
set +e
./gradlew connectedDebugAndroidTest
RC=$?
set -e
if [ "$RC" -ne 0 ]; then
mkdir -p artifacts
adb shell screencap -p /sdcard/fail.png
adb pull /sdcard/fail.png artifacts/fail.png
adb logcat -d -v threadtime > artifacts/logcat.txt
adb logcat -d -b crash -v threadtime > artifacts/crash.txt
fi
exit $RCThis captures the device's last frame plus a logcat dump only on failure (saves CI storage on green runs). For richer per-test artefact routing, prefer the AndroidX TestStorageService API — see .
../../transfer/extracting-test-artifacts/SKILL.md标准模式: 或 会在测试失败时触发 ,执行 + ,并将制品拉取到按测试划分的目录中。
TestRuleTestWatcherfailed()screencaplogcat -dkotlin
class CaptureOnFailureRule(private val outputDir: File) : TestWatcher() {
override fun failed(e: Throwable, description: Description) {
val testName = "${description.className}.${description.methodName}"
val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
val target = File(outputDir, testName).apply { mkdirs() }
// PNG screenshot
device.executeShellCommand("screencap -p /sdcard/fail.png")
device.executeShellCommand("logcat -d -v threadtime").let { log ->
File(target, "logcat.txt").writeText(log)
}
// The test process can pull /sdcard/fail.png via Context.getExternalFilesDir
// or push through TestStorageService — see ../../transfer/extracting-test-artifacts/SKILL.md.
}
}CI 脚本中的宿主机端等效实现(完整版本请参阅 ):
../../automation/scripting-adb-for-ci/SKILL.mdbash
set +e
./gradlew connectedDebugAndroidTest
RC=$?
set -e
if [ "$RC" -ne 0 ]; then
mkdir -p artifacts
adb shell screencap -p /sdcard/fail.png
adb pull /sdcard/fail.png artifacts/fail.png
adb logcat -d -v threadtime > artifacts/logcat.txt
adb logcat -d -b crash -v threadtime > artifacts/crash.txt
fi
exit $RC这样只在失败时捕获设备最后一帧和 logcat 转储(CI 测试通过时不会浪费存储空间)。如需按测试更精细地路由制品,请优先使用 AndroidX TestStorageService API——请参阅 。
../../transfer/extracting-test-artifacts/SKILL.mdPatterns
模式
Pattern: WRONG — screencap
without -p
screencap-p模式:错误——不带 -p
的 screencap
-pscreencapbash
undefinedbash
undefinedWRONG
WRONG
adb shell screencap /sdcard/out.png
file /sdcard/out.png # → "data" (not a PNG)
adb shell screencap /sdcard/out.png
file /sdcard/out.png # → "data" (not a PNG)
WRONG because: without -p, screencap writes a raw RGBA framebuffer (header + naked pixel
WRONG because: without -p, screencap writes a raw RGBA framebuffer (header + naked pixel
bytes), not a PNG. Image viewers refuse to open it. The .png extension is misleading.
bytes), not a PNG. Image viewers refuse to open it. The .png extension is misleading.
```bash
```bashRIGHT
RIGHT
adb shell screencap -p /sdcard/out.png
adb pull /sdcard/out.png ./out.png
undefinedadb shell screencap -p /sdcard/out.png
adb pull /sdcard/out.png ./out.png
undefinedPattern: WRONG — adb shell screencap -p > out.png
on Windows
adb shell screencap -p > out.png模式:错误——在 Windows 上使用 adb shell screencap -p > out.png
adb shell screencap -p > out.pngbash
undefinedbash
undefinedWRONG (on Windows / certain CI hosts)
WRONG (on Windows / certain CI hosts)
adb shell screencap -p > out.png
adb shell screencap -p > out.png
WRONG because: adb shell
allocates a PTY and translates LF to CRLF on stdout. For
adb shellWRONG because: adb shell
allocates a PTY and translates LF to CRLF on stdout. For
adb shellbinary streams (PNG bytes) this corrupts the file.
binary streams (PNG bytes) this corrupts the file.
```bash
```bashRIGHT (binary-clean stdout)
RIGHT (binary-clean stdout)
adb exec-out screencap -p > out.png
undefinedadb exec-out screencap -p > out.png
undefinedPattern: long capture exceeds 3-minute cap
模式:长时间捕获超过 3 分钟上限
bash
undefinedbash
undefinedWRONG — assumes a single screenrecord can capture 10 minutes
WRONG — assumes a single screenrecord can capture 10 minutes
adb shell screenrecord --time-limit 600 /sdcard/run.mp4
adb shell screenrecord --time-limit 600 /sdcard/run.mp4
WRONG because: --time-limit is capped at 180. The utility silently truncates to 180.
WRONG because: --time-limit is capped at 180. The utility silently truncates to 180.
```bash
```bashRIGHT — chain
RIGHT — chain
for i in 1 2 3 4; do
adb shell screenrecord --time-limit 180 /sdcard/run-$i.mp4
done
adb pull /sdcard/run-1.mp4 ./
adb pull /sdcard/run-2.mp4 ./
adb pull /sdcard/run-3.mp4 ./
adb pull /sdcard/run-4.mp4 ./
for i in 1 2 3 4; do
adb shell screenrecord --time-limit 180 /sdcard/run-$i.mp4
done
adb pull /sdcard/run-1.mp4 ./
adb pull /sdcard/run-2.mp4 ./
adb pull /sdcard/run-3.mp4 ./
adb pull /sdcard/run-4.mp4 ./
Concatenate with ffmpeg if needed:
Concatenate with ffmpeg if needed:
ffmpeg -f concat -i list.txt -c copy out.mp4
ffmpeg -f concat -i list.txt -c copy out.mp4
(Or switch to scrcpy for indefinite-duration captures.)
(或者改用 scrcpy 进行不限时长的捕获。)Pattern: bug-report overlay for QA repros
模式:用于 QA 复现的缺陷报告叠加层
bash
adb shell screenrecord --bugreport --time-limit 60 \
--bit-rate 8000000 --size 720x1280 /sdcard/repro.mp4bash
adb shell screenrecord --bugreport --time-limit 60 \
--bit-rate 8000000 --size 720x1280 /sdcard/repro.mp4Each frame has a frame-info + timestamp overlay aligning with logcat -v threadtime,year,UTC.
Each frame has a frame-info + timestamp overlay aligning with logcat -v threadtime,year,UTC.
adb pull /sdcard/repro.mp4 ./repro.mp4
adb logcat -d -v threadtime,year,UTC > repro-logcat.txt
undefinedadb pull /sdcard/repro.mp4 ./repro.mp4
adb logcat -d -v threadtime,year,UTC > repro-logcat.txt
undefinedMandatory rules
强制规则
- MUST pass to
-pfor PNG output. Without it, the file is raw RGBA and unusable in image viewers.screencap - MUST prefer over
adb exec-out screencap -p > out.pngfor streaming captures, especially on Windows or any CI host whereadb shell screencap -p > out.pngtranslation may apply.\n → \r\n - MUST treat as bounded by 180 s. Anything longer requires chaining or scrcpy.
screenrecord --time-limit - MUST stop with
screenrecord(notadb shell pkill -INT screenrecordfrom the host) — SIGKILL leaves the MP4 unfinalised and unplayable.kill -9 - MUST NOT assume captures audio — it does not (developer.android.com/tools/adb#screenrecord).
screenrecord - MUST NOT use on Wear OS — unsupported.
screenrecord - PREFERRED: capture-on-failure only (not on every run). Saves CI storage and points at the failing test directly.
- PREFERRED: pair every with a
screenrecord --bugreportdump captured at the same time. The overlay is otherwise hard to correlate.logcat -v threadtime,year,UTC
- 必须为 的 PNG 输出传入
screencap。否则文件为原始 RGBA 数据,图像查看器无法使用。-p - 必须在流式捕获时优先使用 ,而不是
adb exec-out screencap -p > out.png,尤其是在 Windows 或任何可能发生adb shell screencap -p > out.png转换的 CI 宿主机上。\n → \r\n - 必须将 视为最长 180 秒。超过该时长需要串联录制或使用 scrcpy。
screenrecord --time-limit - 必须使用 停止
adb shell pkill -INT screenrecord(不要从宿主机执行screenrecord)——SIGKILL 会使 MP4 未能完成封装且无法播放。kill -9 - 不得假设 会捕获音频——它不会捕获音频(developer.android.com/tools/adb#screenrecord)。
screenrecord - 不得在 Wear OS 上使用 ——不支持。
screenrecord - **首选:**仅在失败时捕获(而不是每次运行都捕获)。这可节省 CI 存储空间,并直接指向失败的测试。
- **首选:**每次使用 时,都应同时捕获
screenrecord --bugreport。否则叠加层很难与日志关联。logcat -v threadtime,year,UTC
Verification
验证
- reports
file ./out.pngafterPNG image data.adb shell screencap -p /sdcard/out.png && adb pull /sdcard/out.png - On Windows CI, screenshots stream via (no
adb exec-out screencap -p > out.pngcorruption).\r\n - CI captures and
screencaponly when the test exit code is non-zero.logcat -d - No with
screenrecord --time-limit <N>exists in any script.N > 180 - No on a
kill -9process — onlyscreenrecordso the MP4 finalises.pkill -INT screenrecord - CI artefact archive contains per-test sub-directories named after .
Class.method
- 在执行 后,
adb shell screencap -p /sdcard/out.png && adb pull /sdcard/out.png报告file ./out.png。PNG image data - 在 Windows CI 上,截图通过 流式传输(无
adb exec-out screencap -p > out.png损坏)。\r\n - CI 仅在测试退出码非零时捕获 和
screencap。logcat -d - 任何脚本中都不存在 且
screenrecord --time-limit <N>的情况。N > 180 - 不对 进程使用
screenrecord——仅使用kill -9,以确保 MP4 正常完成封装。pkill -INT screenrecord - CI 制品归档包含以 命名的按测试划分子目录。
Class.method
References
参考资料
- developer.android.com/tools/adb#screencap — syntax,
screencapflag, exec-out streaming.-p - developer.android.com/tools/adb#screenrecord — syntax, flags, hard limits ("Audio is not recorded", 180 s cap, no Wear OS, no rotation mid-recording).
screenrecord - developer.android.com/tools/adb#shellcommands — quoting + the vs
exec-outdistinction.shell - developer.android.com/training/testing/instrumented-tests/stability — screenshot/repro hygiene in instrumented tests.
- Research note — full
tasks/research/A2-adb-shell-commands.md/screencapflag tables.screenrecord - Research note — capture-on-failure CI pattern;
tasks/research/A3-adb-observability-automation.mdrationale.exec-out - Sibling skill: — server / daemon /
../../architecture/understanding-adb-architecture/SKILL.mdvsadb shell.adb exec-out - Sibling skill: —
../../devices/connecting-to-devices/SKILL.md, multi-device targeting.adb get-state - Sibling skill: —
../../devices/connecting-over-wifi/SKILL.mdfor wireless capture.adb pair - Sibling skill: — installing APKs to capture against.
../../apps/installing-and-managing-apps/SKILL.md - Sibling skill: —
../../tests/running-instrumented-tests-via-adb/SKILL.mdinvocation.am instrument - Sibling skill: — driving gestures before capturing.
../../control/injecting-input-and-state/SKILL.md - Sibling skill: — companion logcat capture in capture-on-failure.
../../observability/extracting-logs-with-logcat/SKILL.md - Sibling skill: —
../../transfer/extracting-test-artifacts/SKILL.mdand TestStorageService.adb pull - Sibling skill: — full CI capture-on-failure pattern.
../../automation/scripting-adb-for-ci/SKILL.md - Cross-set: — the JUnit4
../../../instrumentation/runner/running-instrumented-tests-with-androidjunit4/SKILL.mdmechanic.TestWatcher - Cross-set: — driving an Activity to the failing state before capture.
../../../instrumentation/scenarios/launching-activities-with-activityscenario/SKILL.md - Cross-set: — when capture-on-failure beats screenshot-every-run.
../../../fundamentals/strategies/applying-testing-strategies/SKILL.md
- developer.android.com/tools/adb#screencap — 语法、
screencap标志及 exec-out 流式传输。-p - developer.android.com/tools/adb#screenrecord — 语法、标志和硬性限制(“不录制音频”、180 秒上限、不支持 Wear OS、录制中途无法旋转)。
screenrecord - developer.android.com/tools/adb#shellcommands — 引号处理以及 与
exec-out的区别。shell - developer.android.com/training/testing/instrumented-tests/stability — 插桩测试中的截图/复现规范。
- 研究笔记 — 完整的
tasks/research/A2-adb-shell-commands.md/screencap标志表。screenrecord - 研究笔记 — 失败时捕获的 CI 模式及
tasks/research/A3-adb-observability-automation.md原理。exec-out - 同级 skill:——server / daemon 以及
../../architecture/understanding-adb-architecture/SKILL.md与adb shell的区别。adb exec-out - 同级 skill:——
../../devices/connecting-to-devices/SKILL.md和多设备定向。adb get-state - 同级 skill:——通过
../../devices/connecting-over-wifi/SKILL.md进行无线捕获。adb pair - 同级 skill:——安装 APK 以供捕获。
../../apps/installing-and-managing-apps/SKILL.md - 同级 skill:——
../../tests/running-instrumented-tests-via-adb/SKILL.md调用。am instrument - 同级 skill:——捕获前驱动设备执行手势操作。
../../control/injecting-input-and-state/SKILL.md - 同级 skill:——失败时捕获配套使用的 logcat。
../../observability/extracting-logs-with-logcat/SKILL.md - 同级 skill:——
../../transfer/extracting-test-artifacts/SKILL.md和 TestStorageService。adb pull - 同级 skill:——完整的 CI 失败时捕获模式。
../../automation/scripting-adb-for-ci/SKILL.md - 跨集合 skill:——JUnit4
../../../instrumentation/runner/running-instrumented-tests-with-androidjunit4/SKILL.md机制。TestWatcher - 跨集合 skill:——在捕获前将 Activity 驱动至失败状态。
../../../instrumentation/scenarios/launching-activities-with-activityscenario/SKILL.md - 跨集合 skill:——何时采用失败时捕获而非每次运行都截图。
../../../fundamentals/strategies/applying-testing-strategies/SKILL.md