android_install_apk revision 7507276d8626a6d4a4073b3f93bd2eaa9f21f111
1#!/bin/bash 2# 3# android_install_skia: installs the skia apk on the device. 4 5function print_usage { 6 echo "USAGE: android_install_skia [options]" 7 echo " Options: -f Forces the package to be installed by removing any" 8 echo " previously installed packages" 9 echo " -h Prints this help message" 10 echo " --release Install the release build of Skia" 11 echo " -s [device_s/n] Serial number of the device to be used" 12} 13 14SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 15 16source $SCRIPT_DIR/android_setup.sh 17source $SCRIPT_DIR/utils/setup_adb.sh 18 19forceRemoval="false" 20installLauncher="false" 21installOptions="-r" 22configuration="Debug" 23 24for arg in ${APP_ARGS[@]} 25do 26 if [[ "${arg}" == "-f" ]]; 27 then 28 forceRemoval="true" 29 elif [[ "${arg}" == "-h" ]]; 30 then 31 print_usage 32 exit 33 elif [[ "${arg}" == "-r" ]]; 34 then 35 echo "DEPRECATED: -r is now a no-op" 36 elif [[ "${arg}" == "--release" ]]; 37 then 38 configuration="Release" 39 else 40 echo "ERROR: unrecognized option ${arg}" 41 print_usage 42 exit 1; 43 fi 44done 45 46if [[ "$forceRemoval" == "true" ]]; 47then 48 echo "Forcing removal of previously installed packages" 49 $ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null 50fi 51 52echo "Installing Skia App from ${SKIA_OUT}/${configuration}" 53$ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${configuration}/android/bin/SkiaAndroid.apk 54