2016-09-08 17:03:21 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Run a GN-built Android binary on the connected device.
|
|
|
|
#
|
|
|
|
# Example usage:
|
|
|
|
# $ ninja -C out dm
|
|
|
|
# $ droid out/dm --src gm --config gpu
|
|
|
|
#
|
|
|
|
# See https://skia.org/user/quick/gn for build instructions.
|
|
|
|
|
|
|
|
path=$1
|
|
|
|
name=$(basename $1)
|
|
|
|
shift
|
|
|
|
args=$@
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2018-06-28 15:19:23 +00:00
|
|
|
adb push --sync $path //data/local/tmp/
|
|
|
|
adb push --sync resources //data/local/tmp/
|
2016-10-24 20:49:15 +00:00
|
|
|
adb shell "chmod +x //data/local/tmp/$name"
|
|
|
|
adb shell "cd //data/local/tmp; ./$name $args"
|