cargo run into Android/adb: configurable target device

This commit is contained in:
Simon Sapin 2018-06-25 22:17:05 +02:00
parent 1f8d04b8e1
commit 6e6870516e

View file

@ -1,10 +1,22 @@
#!/bin/sh
# Any
#target=""
# Specific device
#target="-s something"
# Emulator
target="-e"
# USB
#target="-d"
path="$1"
base="$(basename $1)"
remote_path="/data/local/tmp/$base"
shift
adb -e wait-for-device
adb -e push "$path" "$remote_path"
adb -e shell "$remote_path" "$@"
adb $target "wait-for-device"
adb $target push "$path" "$remote_path" >&2
adb $target shell "$remote_path" "$@"