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 #!/bin/sh
# Any
#target=""
# Specific device
#target="-s something"
# Emulator
target="-e"
# USB
#target="-d"
path="$1" path="$1"
base="$(basename $1)" base="$(basename $1)"
remote_path="/data/local/tmp/$base" remote_path="/data/local/tmp/$base"
shift shift
adb -e wait-for-device adb $target "wait-for-device"
adb -e push "$path" "$remote_path" adb $target push "$path" "$remote_path" >&2
adb -e shell "$remote_path" "$@" adb $target shell "$remote_path" "$@"