aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/droid
blob: cb48e366fac7839adf05434441c3845fde617413 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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

adb push --sync $path //data/local/tmp/
adb push --sync resources //data/local/tmp/
adb shell "chmod +x //data/local/tmp/$name"
adb shell "cd //data/local/tmp; ./$name $args"