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

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

Issue 2140663002: Update documents/scripts for SampleApp removal (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Resources Created 4 years, 5 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
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # android_gdb_app: Pushes gdbserver, launches sampleApp, and connects 3 # android_gdb_app: Pushes gdbserver, launches Viewer, and connects
4 # the debugging environment. 4 # the debugging environment.
5 5
6 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
7 source $SCRIPT_DIR/android_setup.sh "$@" 7 source $SCRIPT_DIR/android_setup.sh "$@"
8 source $SCRIPT_DIR/utils/setup_adb.sh 8 source $SCRIPT_DIR/utils/setup_adb.sh
9 9
10 app=${APP_ARGS[0]} 10 APP_ARGS=( "Viewer" ${APP_ARGS[*]} )
11 if [[ ${app} == '-'* ]]; then
12 echo "Defaulting to running SampleApp."
13 app="SampleApp"
14 APP_ARGS=( "SampleApp" ${APP_ARGS[*]} )
15 fi
16 PORT=5039 11 PORT=5039
17 12
18 if [[ ${app} == 'SampleApp' ]]; then 13 activity="org.skia.viewer/org.skia.viewer.ViewerActivity"
19 activity="com.skia.sample_app/com.skia.SkiaSampleActivity" 14 activityShort="org.skia.viewer"
20 activityShort="com.skia.sample_app"
21 elif [[ ${app} == "Viewer" ]] ; then
22 activity="org.skia.viewer/org.skia.viewer.ViewerActivity"
23 activityShort="org.skia.viewer"
24 else
25 echo "ERROR: supports either 'SampleApp' or 'Viewer' as valid apps"
26 exit 1
27 fi
28 15
29 # Forward local to remote socket connection. 16 # Forward local to remote socket connection.
30 $ADB $DEVICE_SERIAL forward "tcp:$PORT" "tcp:$PORT" 17 $ADB $DEVICE_SERIAL forward "tcp:$PORT" "tcp:$PORT"
31 18
32 # We kill all previous instances of gdbserver to rid all port overriding errors. 19 # We kill all previous instances of gdbserver to rid all port overriding errors.
33 if [ $(uname) == "Linux" ]; then 20 if [ $(uname) == "Linux" ]; then
34 $ADB $DEVICE_SERIAL shell ps | grep gdbserver | awk '{print $2}' | xargs -r $ADB $DEVICE_SERIAL shell kill 21 $ADB $DEVICE_SERIAL shell ps | grep gdbserver | awk '{print $2}' | xargs -r $ADB $DEVICE_SERIAL shell kill
35 elif [ $(uname) == "Darwin" ]; then 22 elif [ $(uname) == "Darwin" ]; then
36 $ADB $DEVICE_SERIAL shell ps | grep gdbserver | awk '{print $2}' | xargs $AD B $DEVICE_SERIAL shell kill 23 $ADB $DEVICE_SERIAL shell ps | grep gdbserver | awk '{print $2}' | xargs $AD B $DEVICE_SERIAL shell kill
37 else 24 else
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 echo "Entering gdb client shell" 57 echo "Entering gdb client shell"
71 ${ANDROID_TOOLCHAIN}/host_prebuilt/bin/gdb-orig -x $GDBSETUP 58 ${ANDROID_TOOLCHAIN}/host_prebuilt/bin/gdb-orig -x $GDBSETUP
72 59
73 # Clean up: 60 # Clean up:
74 # We could 'rm -rf $GDB_TMP_DIR', but doing so would cause subsequent debugging 61 # We could 'rm -rf $GDB_TMP_DIR', but doing so would cause subsequent debugging
75 # sessions to take longer than necessary. The tradeoff is to now force the user 62 # sessions to take longer than necessary. The tradeoff is to now force the user
76 # to remove the directory when they are done debugging. 63 # to remove the directory when they are done debugging.
77 rm $GDBSETUP 64 rm $GDBSETUP
78 65
79 66
OLDNEW
« no previous file with comments | « no previous file | platform_tools/android/bin/android_install_app » ('j') | site/user/quick/android.md » ('J')

Powered by Google App Engine
This is Rietveld 408576698