mtklein | f3155ad | 2016-09-08 10:03:21 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Run a GN-built Android binary on the connected device. |
| 4 | # |
| 5 | # Example usage: |
| 6 | # $ ninja -C out dm |
| 7 | # $ droid out/dm --src gm --config gpu |
| 8 | # |
| 9 | # See https://skia.org/user/quick/gn for build instructions. |
| 10 | |
| 11 | path=$1 |
| 12 | name=$(basename $1) |
| 13 | shift |
| 14 | args=$@ |
| 15 | |
| 16 | set -e |
| 17 | set -x |
| 18 | |
Mike Klein | 25e2559 | 2018-06-28 11:19:23 -0400 | [diff] [blame] | 19 | adb push --sync $path //data/local/tmp/ |
| 20 | adb push --sync resources //data/local/tmp/ |
Mike Klein | 82364ba | 2016-10-24 16:49:15 -0400 | [diff] [blame] | 21 | adb shell "chmod +x //data/local/tmp/$name" |
| 22 | adb shell "cd //data/local/tmp; ./$name $args" |