aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools/android
diff options
context:
space:
mode:
authorGravatar liyuqian <liyuqian@google.com>2016-07-12 09:12:39 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-12 09:12:39 -0700
commite7d15fe870e8d6b0d4b072fc02a2a1c079743485 (patch)
tree01758302f954e4d14cf2b3ff17537680c1d0ca5b /platform_tools/android
parent1264472c06cebd283d1ec123014c58f5d3c4cad1 (diff)
Update documents/scripts for SampleApp removal
Diffstat (limited to 'platform_tools/android')
-rwxr-xr-xplatform_tools/android/bin/android_gdb_app21
-rwxr-xr-xplatform_tools/android/bin/android_install_app22
-rwxr-xr-xplatform_tools/android/bin/android_launch_app18
3 files changed, 8 insertions, 53 deletions
diff --git a/platform_tools/android/bin/android_gdb_app b/platform_tools/android/bin/android_gdb_app
index 68d517b9a0..e6a96fee7c 100755
--- a/platform_tools/android/bin/android_gdb_app
+++ b/platform_tools/android/bin/android_gdb_app
@@ -1,30 +1,17 @@
#!/bin/bash
#
-# android_gdb_app: Pushes gdbserver, launches sampleApp, and connects
+# android_gdb_app: Pushes gdbserver, launches Viewer, and connects
# the debugging environment.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/android_setup.sh "$@"
source $SCRIPT_DIR/utils/setup_adb.sh
-app=${APP_ARGS[0]}
-if [[ ${app} == '-'* ]]; then
- echo "Defaulting to running SampleApp."
- app="SampleApp"
- APP_ARGS=( "SampleApp" ${APP_ARGS[*]} )
-fi
+APP_ARGS=( "Viewer" ${APP_ARGS[*]} )
PORT=5039
-if [[ ${app} == 'SampleApp' ]]; then
- activity="com.skia.sample_app/com.skia.SkiaSampleActivity"
- activityShort="com.skia.sample_app"
-elif [[ ${app} == "Viewer" ]] ; then
- activity="org.skia.viewer/org.skia.viewer.ViewerActivity"
- activityShort="org.skia.viewer"
-else
- echo "ERROR: supports either 'SampleApp' or 'Viewer' as valid apps"
- exit 1
-fi
+activity="org.skia.viewer/org.skia.viewer.ViewerActivity"
+activityShort="org.skia.viewer"
# Forward local to remote socket connection.
$ADB $DEVICE_SERIAL forward "tcp:$PORT" "tcp:$PORT"
diff --git a/platform_tools/android/bin/android_install_app b/platform_tools/android/bin/android_install_app
index 74aea516c3..fe16cd5285 100755
--- a/platform_tools/android/bin/android_install_app
+++ b/platform_tools/android/bin/android_install_app
@@ -3,13 +3,12 @@
# android_install_app: installs the Skia development apps on the device.
function print_usage {
- echo "USAGE: android_install_app [options] AppName"
+ echo "USAGE: android_install_app [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"
- echo " AppName Can be either SampleApp or Viewer"
}
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -18,7 +17,6 @@ source $SCRIPT_DIR/android_setup.sh
source $SCRIPT_DIR/utils/setup_adb.sh
forceRemoval="false"
-app=""
for arg in ${APP_ARGS[@]}; do
if [[ "${arg}" == "-f" ]]; then
@@ -32,21 +30,9 @@ for arg in ${APP_ARGS[@]}; do
echo "ERROR: unrecognized option ${arg}"
print_usage
exit 1;
- else
- if [[ ${app} != "" ]]; then
- echo "ERROR: app already defined ${app}"
- exit 1;
- else
- app=${arg}
- fi
fi
done
-if [[ ${app} == "" ]]; then
- echo "Defaulting to installing SampleApp."
- app="SampleApp"
-fi
-
if [[ "$forceRemoval" == "true" ]];
then
@@ -61,11 +47,7 @@ else
apk_suffix="debug.apk"
fi
-if [[ ${app} == 'SampleApp' ]]; then
- app="sample_app"
-fi
-
-APP_LC=$(echo $app | tr "[:upper:]" "[:lower:]")
+APP_LC=$(echo Viewer | tr "[:upper:]" "[:lower:]")
echo "Installing ${APP_LC} from ${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ARCH}-${apk_suffix}"
$ADB ${DEVICE_SERIAL} install -r ${SCRIPT_DIR}/../apps/${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ARCH}-${apk_suffix}
diff --git a/platform_tools/android/bin/android_launch_app b/platform_tools/android/bin/android_launch_app
index 93bd1f70ad..0e65ba143d 100755
--- a/platform_tools/android/bin/android_launch_app
+++ b/platform_tools/android/bin/android_launch_app
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# android_launch_app: Launches the skia sampleApp on the device.
+# android_launch_app: Launches the skia Viewer app on the device.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/android_setup.sh
@@ -12,19 +12,5 @@ if [[ -n $RESOURCE_PATH ]]; then
adb_push_if_needed "${SKIA_SRC_DIR}/resources" $RESOURCE_PATH
fi
-app=${APP_ARGS[0]}
-if [[ ${app} == '-'* ]]; then
- echo "Defaulting to running SampleApp."
- app="SampleApp"
- APP_ARGS=( "SampleApp" ${APP_ARGS[*]} )
-fi
-
-if [[ ${app} == 'SampleApp' ]]; then
- activity="com.skia.sample_app/com.skia.SkiaSampleActivity"
-elif [[ ${app} == "Viewer" ]] ; then
- activity="org.skia.viewer/org.skia.viewer.ViewerActivity"
-else
- echo "ERROR: supports either 'SampleApp' or 'Viewer' as valid apps"
- exit 1
-fi
+activity="org.skia.viewer/org.skia.viewer.ViewerActivity"
$ADB ${DEVICE_SERIAL} shell "am start -S -n ${activity} --es cmdLineFlags \"${APP_ARGS[*]:1}\""