Files
egutierrez 47fac22230 chore: auto-commit (799 archivos)
- .claude/CLAUDE.md
- .claude/commands/subagentes.md
- .claude/rules/INDEX.md
- .mcp.json
- bash/functions/cybersecurity/analyze_dns.md
- bash/functions/cybersecurity/audit_http_headers.md
- bash/functions/cybersecurity/audit_ssh_config.md
- bash/functions/cybersecurity/check_firewall.md
- bash/functions/cybersecurity/detect_suspicious_users.md
- bash/functions/cybersecurity/encrypt_file.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 00:28:20 +02:00

1.7 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports params output tested tests test_file_path file_path
android_screenshot function bash infra 1.0.0 impure android_screenshot([--serial <S>], output_path: string) -> void Capture screen as PNG via adb exec-out screencap -p.
android
adb
screenshot
screen
capture
pendiente-usar
adb_wsl_bash_infra
false error_go_core
name desc
--serial <S> Optional ADB serial to target a specific device/emulator. If omitted, autodetects the first connected device.
name desc
output_path WSL path where the PNG screenshot will be written (e.g. /tmp/screen.png). Parent directory is created if absent.
Stdout 'screenshot: <path> (<bytes> bytes) from <serial>'. PNG file written to disk. false
bash/functions/infra/android_screenshot.sh

Ejemplo

source bash/functions/infra/android_screenshot.sh
android_screenshot /tmp/screen.png
# screenshot: /tmp/screen.png (123456 bytes) from emulator-5554

# Targeting a specific device:
android_screenshot --serial emulator-5554 /tmp/screen.png

Notas

Sources adb_wsl.sh from its own directory, so ADB and ANDROID_SDK_WIN env vars are respected as with all other android_* functions.

Exit codes:

  • 0 — screenshot captured successfully.
  • 1 — missing output path, screencap produced empty file, or adb error.
  • 3 — no device/emulator connected (propagated from adb_pick_serial).

The emptiness check (! -s) handles the case where adb exec-out exits 0 but writes zero bytes (e.g. device locked, screencap permission denied). In that case the file is removed and exit 1 is returned.