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

51 lines
1.6 KiB
Markdown

---
name: android_push
kind: function
lang: bash
domain: infra
version: "1.0.0"
purity: impure
signature: "android_push([--serial <S>], local_path: string, remote_path: string) -> void"
description: "Push file/dir from WSL to Android device via adb push."
tags: [android, adb, push, file, transfer, pendiente-usar]
params:
- name: "--serial <S>"
desc: "Optional target device/emulator serial. Auto-detected if omitted."
- name: "local_path"
desc: "WSL source path to file or directory to push."
- name: "remote_path"
desc: "Device destination path, e.g. /sdcard/Download/foo.txt."
output: "Stdout 'pushed: <local> → <remote> on <serial>'. Exit 0."
uses_functions: [adb_wsl_bash_infra]
uses_types: []
returns: []
returns_optional: false
error_type: "error_go_core"
imports: []
tested: false
tests: []
test_file_path: ""
file_path: "bash/functions/infra/android_push.sh"
---
## Ejemplo
```bash
# Push a file to the active emulator
android_push /tmp/data.json /sdcard/Download/data.json
# Push to a specific device
android_push --serial emulator-5554 /tmp/data.json /sdcard/Download/data.json
# Push a directory
android_push --serial R5CR1234567 ~/exports/bundle /sdcard/Download/bundle
```
## Notas
Usa `adb_pick_serial` de `adb_wsl.sh` para resolver el dispositivo objetivo.
Si `--serial` no se pasa, autodetecta el primer device/emulador disponible.
Sale con exit 3 si no hay ningun device conectado.
Valida que `local_path` existe en WSL antes de convertir y enviar.
Convierte el path WSL a Windows con `adb_wsl_to_win` (requiere `wslpath`; si no está disponible usa el path tal cual).