cb6d9e61d1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
19 lines
458 B
Bash
19 lines
458 B
Bash
#!/usr/bin/env bash
|
|
# android_shell — Execute arbitrary shell command on Android device via adb shell
|
|
|
|
# shellcheck source=./adb_wsl.sh
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
source "$SCRIPT_DIR/adb_wsl.sh"
|
|
|
|
android_shell() {
|
|
adb_pick_serial "$@" || exit 3
|
|
local serial="$ADB_PICK_SERIAL"
|
|
set -- "${ADB_PICK_REST[@]}"
|
|
|
|
adb_s "$serial" shell "$@"
|
|
}
|
|
|
|
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
|
android_shell "$@"
|
|
fi
|