skia2/platform_tools/android/bin/android_install_apk
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

56 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
#
# android_install_skia: installs the skia apk on the device.
function print_usage {
echo "USAGE: android_install_skia [options]"
echo " Options: -f Forces the package to be installed by removing any"
echo " previously installed packages"
echo " -h Prints this help message"
echo " --release Install the release build of Skia"
echo " -s [device_s/n] Serial number of the device to be used"
}
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/utils/setup_adb.sh
source $SCRIPT_DIR/utils/setup_skia_out.sh
forceRemoval="false"
installLauncher="false"
installOptions="-r"
configuration="Debug"
while (( "$#" )); do
if [[ "$1" == "-f" ]];
then
forceRemoval="true"
elif [[ "$1" == "-h" ]];
then
print_usage
exit
elif [[ "$1" == "-r" ]];
then
echo "DEPRECATED: -r is now a no-op"
elif [[ "$1" == "--release" ]];
then
configuration="Release"
else
echo "ERROR: unrecognized option $1"
print_usage
exit 1;
fi
shift
done
if [[ "$forceRemoval" == "true" ]];
then
echo "Forcing removal of previously installed packages"
$ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null
fi
echo "Installing Skia App from ${SKIA_OUT}/${configuration}"
$ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${configuration}/android/bin/SkiaAndroid.apk