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

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

Issue 22617002: Update Skia Android tools. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # android_install_skia: installs the skia apk on the device. 3 # android_install_skia: installs the skia apk on the device.
4 4
5 function print_usage { 5 function print_usage {
6 echo "USAGE: android_install_skia [options]" 6 echo "USAGE: android_install_skia [options]"
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 " --install-launcher Remounts the system partition and installs the"
11 echo " skia_launcher binary on the device"
12 echo " --release Install the release build of Skia" 10 echo " --release Install the release build of Skia"
13 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"
14 } 12 }
15 13
16 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 14 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
17 15
18 source $SCRIPT_DIR/utils/setup_adb.sh 16 source $SCRIPT_DIR/utils/setup_adb.sh
19 source $SCRIPT_DIR/utils/setup_skia_out.sh 17 source $SCRIPT_DIR/utils/setup_skia_out.sh
20 18
21 forceRemoval="false" 19 forceRemoval="false"
22 installLauncher="false" 20 installLauncher="false"
23 installOptions="-r" 21 installOptions="-r"
24 configuration="Debug" 22 configuration="Debug"
25 serialNumber="" 23 serialNumber=""
26 24
27 while (( "$#" )); do 25 while (( "$#" )); do
28 26
29 if [[ "$1" == "-f" ]]; 27 if [[ "$1" == "-f" ]];
30 then 28 then
31 forceRemoval="true" 29 forceRemoval="true"
32 elif [[ "$1" == "-h" ]]; 30 elif [[ "$1" == "-h" ]];
33 then 31 then
34 print_usage 32 print_usage
35 exit 33 exit
36 elif [[ "$1" == "--install-launcher" ]];
37 then
38 installLauncher="true"
39 elif [[ "$1" == "-r" ]]; 34 elif [[ "$1" == "-r" ]];
40 then 35 then
41 echo "DEPRECATED: -r is now a no-op" 36 echo "DEPRECATED: -r is now a no-op"
42 elif [[ "$1" == "--release" ]]; 37 elif [[ "$1" == "--release" ]];
43 then 38 then
44 configuration="Release" 39 configuration="Release"
45 elif [[ "$1" == "-s" ]]; 40 elif [[ "$1" == "-s" ]];
46 then 41 then
47 if [[ $# -lt 2 ]]; 42 if [[ $# -lt 2 ]];
48 then 43 then
(...skipping 10 matching lines...) Expand all
59 54
60 shift 55 shift
61 done 56 done
62 57
63 if [[ "$forceRemoval" == "true" ]]; 58 if [[ "$forceRemoval" == "true" ]];
64 then 59 then
65 echo "Forcing removal of previously installed packages" 60 echo "Forcing removal of previously installed packages"
66 $ADB ${serialNumber} uninstall com.skia > /dev/null 61 $ADB ${serialNumber} uninstall com.skia > /dev/null
67 fi 62 fi
68 63
69 if [[ "$installLauncher" == "true" ]];
70 then
71 echo "Installing skia_launcher binary"
72 $ADB ${serialNumber} root
73 $ADB ${serialNumber} remount
74 $ADB ${serialNumber} push ${SKIA_OUT}/${configuration}/skia_launcher /system /bin
75 fi
76
77 echo "Installing Skia App from ${SKIA_OUT}/${configuration}" 64 echo "Installing Skia App from ${SKIA_OUT}/${configuration}"
78 $ADB ${serialNumber} install ${installOptions} ${SKIA_OUT}/${configuration}/andr oid/bin/SkiaAndroid.apk 65 $ADB ${serialNumber} install ${installOptions} ${SKIA_OUT}/${configuration}/andr oid/bin/SkiaAndroid.apk
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698