Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: platform_tools/android/bin/android_install_app

Issue 1589883002: SampleApp: Make android_install_app and android_launch_app work consistently (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | platform_tools/android/bin/android_launch_app » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # android_install_app: installs the skia sampleApp on the device. 3 # android_install_app: installs the Skia development apps on the device.
4 4
5 function print_usage { 5 function print_usage {
6 echo "USAGE: android_install_app [options]" 6 echo "USAGE: android_install_app [options] AppName"
7 echo " Options: -f Forces the package to be installed by removing any " 7 echo " Options: -f Forces the package to be installed by removing any "
8 echo " previously installed packages" 8 echo " previously installed packages"
9 echo " -h Prints this help message" 9 echo " -h Prints this help message"
10 echo " --release Install the release build of Skia" 10 echo " --release Install the release build of Skia"
11 echo " -s [device_s/n] Serial number of the device to be used" 11 echo " -s [device_s/n] Serial number of the device to be used"
12 echo " AppName Can be either sample_app or VisualBench" 12 echo " AppName Can be either SampleApp or VisualBench"
13 } 13 }
14 14
15 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 15 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
16 16
17 source $SCRIPT_DIR/android_setup.sh 17 source $SCRIPT_DIR/android_setup.sh
18 source $SCRIPT_DIR/utils/setup_adb.sh 18 source $SCRIPT_DIR/utils/setup_adb.sh
19 19
20 forceRemoval="false" 20 forceRemoval="false"
21 app="" 21 app=""
22 22
(...skipping 13 matching lines...) Expand all
36 if [[ ${app} != "" ]]; then 36 if [[ ${app} != "" ]]; then
37 echo "ERROR: app already defined ${app}" 37 echo "ERROR: app already defined ${app}"
38 exit 1; 38 exit 1;
39 else 39 else
40 app=${arg} 40 app=${arg}
41 fi 41 fi
42 fi 42 fi
43 done 43 done
44 44
45 if [[ ${app} == "" ]]; then 45 if [[ ${app} == "" ]]; then
46 echo "defaulting to installing sample_app." 46 echo "Defaulting to installing SampleApp."
47 app="sample_app" 47 app="SampleApp"
48 fi 48 fi
49 49
50 50
51 if [[ "$forceRemoval" == "true" ]]; 51 if [[ "$forceRemoval" == "true" ]];
52 then 52 then
53 echo "Forcing removal of previously installed packages" 53 echo "Forcing removal of previously installed packages"
54 $ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null 54 $ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null
55 fi 55 fi
56 56
57 if [[ "$BUILDTYPE" == "Release" ]]; 57 if [[ "$BUILDTYPE" == "Release" ]];
58 then 58 then
59 apk_suffix="release.apk" 59 apk_suffix="release.apk"
60 else 60 else
61 apk_suffix="debug.apk" 61 apk_suffix="debug.apk"
62 fi 62 fi
63 63
64 if [[ ${app} == 'SampleApp' ]]; then
65 app="sample_app"
66 fi
64 67
65 APP_LC=$(echo $app | tr "[:upper:]" "[:lower:]") 68 APP_LC=$(echo $app | tr "[:upper:]" "[:lower:]")
66 69
67 echo "Installing ${APP_LC} from ${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ ARCH}-${apk_suffix}" 70 echo "Installing ${APP_LC} from ${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ ARCH}-${apk_suffix}"
68 $ADB ${DEVICE_SERIAL} install -r ${SCRIPT_DIR}/../apps/${APP_LC}/build/outputs/a pk/${APP_LC}-${ANDROID_ARCH}-${apk_suffix} 71 $ADB ${DEVICE_SERIAL} install -r ${SCRIPT_DIR}/../apps/${APP_LC}/build/outputs/a pk/${APP_LC}-${ANDROID_ARCH}-${apk_suffix}
69 72
OLDNEW
« no previous file with comments | « no previous file | platform_tools/android/bin/android_launch_app » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698