skia2/platform_tools/android/bin/android_launch_app
Derek Sollenberger 70120c778a Add tools to support gdb and simpleperf for android executables.
Change-Id: I6e7f41df094ae037538ebd61e40385d7e2e9eb26
Reviewed-on: https://skia-review.googlesource.com/6615
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-05 17:16:01 +00:00

17 lines
568 B
Bash
Executable File

#!/bin/bash
#
# android_launch_app: Launches the skia Viewer app on the device.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/utils/android_setup.sh
source $SCRIPT_DIR/utils/setup_adb.sh
# TODO: check to ensure that the app exists on the device and prompt to install
if [[ -n $RESOURCE_PATH ]]; then
adb_push_if_needed "${SCRIPT_DIR}/../../../resources" $RESOURCE_PATH
fi
activity="org.skia.viewer/org.skia.viewer.ViewerActivity"
$ADB ${DEVICE_SERIAL} shell "am start -S -n ${activity} --es cmdLineFlags \"${APP_ARGS[*]:1}\""