Files
fn_registry/bash/functions/infra/android_shell.md
T
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.5 KiB

name, kind, lang, domain, version, purity, signature, description, tags, params, output, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path, notes
name kind lang domain version purity signature description tags params output uses_functions uses_types returns returns_optional error_type imports tested tests test_file_path file_path notes
android_shell function bash infra 1.0.0 impure android_shell([--serial <S>], cmd ...args) Execute arbitrary shell command on Android device. Multi-emulator via --serial.
android
adb
shell
exec
pendiente-usar
name desc
--serial <S> Optional target device serial. Omit to auto-pick (single device) or use ADB_SERIAL env.
name desc
cmd ...args Shell command + args to run on device. Variadic.
Passthrough stdout/stderr de adb shell. Exit code = shell command exit.
adb_wsl_bash_infra
false error_go_core
false
bash/functions/infra/android_shell.sh Para comandos complejos con pipes/redirects mejor `adb_s $serial shell 'cmd | other'` directo via adb_run.

Ejemplo

android_shell pm list packages
android_shell --serial emulator-5554 getprop ro.product.model
android_shell df -h /sdcard
android_shell ls -la /data/local/tmp

Notas

Sourcea adb_wsl.sh para resolver adb_pick_serial (maneja --serial, ADB_SERIAL, y auto-detect de dispositivo unico) y adb_s (wrapper de adb -s). El array ADB_PICK_REST contiene los args restantes tras consumir --serial.

Para comandos con pipes o redirects que bash interpretaria localmente, mejor pasar como string unico: adb_s "$serial" shell 'cmd | grep foo'.