skia2/platform_tools/android/bin/android_run_skia
djsollen@google.com cc95b1aeb8 Update Skia Android tools.
This CL moves the skia_launcher out of the system/bin and into
/data/local/tmp; removes the need to package our shared libs in an
apk; and updates all the scripts to work in the new environment.

R=mtklein@google.com, scroggo@google.com

Review URL: https://codereview.chromium.org/22617002

git-svn-id: http://skia.googlecode.com/svn/trunk@10673 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-12 12:30:04 +00:00

36 lines
953 B
Bash
Executable File

#!/bin/bash
#
# android_run_skia: starts the correct skia program on the device, prints the
# output, and kills the app if interrupted.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/android_setup.sh
source $SCRIPT_DIR/utils/setup_adb.sh
configuration="Debug"
for arg in ${APP_ARGS[@]}
do
if [[ "${arg}" == "--release" ]];
then
configuration="Release"
else
runVars=("${runVars[@]}" "${arg}")
fi
shift
done
if [ ! -f "${SKIA_OUT}/${configuration}/lib.target/lib${runVars[0]}.so" ];
then
echo "Unable to find the ${runVars[0]} library"
exit 1
fi
adb_push_if_needed "${SKIA_OUT}/${configuration}/skia_launcher" /data/local/tmp
adb_push_if_needed "${SKIA_OUT}/${configuration}/lib.target/libskia_android.so" /data/local/tmp
adb_push_if_needed "${SKIA_OUT}/${configuration}/lib.target/lib${runVars[0]}.so" /data/local/tmp
$ADB ${DEVICE_SERIAL} shell /data/local/tmp/skia_launcher ${runVars[@]}