From 6e6870516e38ce7d9be785ef7e3d7711e6d1b55b Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 25 Jun 2018 22:17:05 +0200 Subject: [PATCH] cargo run into Android/adb: configurable target device --- support/android/egl-configs/run.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/support/android/egl-configs/run.sh b/support/android/egl-configs/run.sh index df59214af77..3842b4bb372 100755 --- a/support/android/egl-configs/run.sh +++ b/support/android/egl-configs/run.sh @@ -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" "$@"