47fac22230
- .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>
47 lines
1.5 KiB
Markdown
47 lines
1.5 KiB
Markdown
---
|
|
name: android_pull
|
|
kind: function
|
|
lang: bash
|
|
domain: infra
|
|
version: "1.0.0"
|
|
purity: impure
|
|
signature: "android_pull [--serial <S>] remote_path local_path"
|
|
description: "Pull file/dir from Android device to WSL via adb pull."
|
|
tags: [android, adb, pull, file, transfer, pendiente-usar]
|
|
uses_functions: [adb_wsl_bash_infra]
|
|
uses_types: []
|
|
returns: []
|
|
returns_optional: false
|
|
error_type: "error_go_core"
|
|
imports: []
|
|
params:
|
|
- name: "--serial <S>"
|
|
desc: "Optional target device serial. If omitted, adb_pick_serial auto-detects the connected device."
|
|
- name: "remote_path"
|
|
desc: "Source path on the Android device (e.g. /sdcard/Pictures/foo.png)."
|
|
- name: "local_path"
|
|
desc: "Destination path in the WSL filesystem. Parent directories are created automatically."
|
|
output: "Stdout 'pulled: <remote> → <local> from <serial>'."
|
|
tested: false
|
|
tests: []
|
|
test_file_path: ""
|
|
file_path: "bash/functions/infra/android_pull.sh"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```bash
|
|
# Pull a single file (auto-detect device)
|
|
android_pull /sdcard/Pictures/foo.png ~/Downloads/foo.png
|
|
|
|
# Pull a directory to a specific local path with explicit serial
|
|
android_pull --serial emulator-5554 /sdcard/DCIM ~/Downloads/DCIM
|
|
```
|
|
|
|
## Notas
|
|
|
|
Sources `adb_wsl.sh` for `adb_pick_serial`, `ADB_PICK_REST`, `adb_wsl_to_win`, and `adb_s`.
|
|
The local path is converted to a Windows path via `adb_wsl_to_win` before passing to `adb pull`,
|
|
which is required because `adb.exe` (Windows binary) does not understand WSL paths.
|
|
Exit code 3 when no device serial can be resolved.
|