Index: platform_tools/android/bin/android_gdb_app |
diff --git a/platform_tools/android/bin/android_gdb_app b/platform_tools/android/bin/android_gdb_app |
index 046fee3dea4b3f1361e19490e7e927d5e90f6cf9..6d0a22194e3efda0e6ebf19d0c95289c4232abfa 100755 |
--- a/platform_tools/android/bin/android_gdb_app |
+++ b/platform_tools/android/bin/android_gdb_app |
@@ -9,6 +9,11 @@ source $SCRIPT_DIR/android_setup.sh "$@" |
APP_NAME=${APP_ARGS[0]} |
PORT=5039 |
+PACKAGE="org.skia.viewer" |
+ACTIVITY="MainActivity" |
djsollen
2016/05/06 18:45:26
checking in this change means we can no longer deb
|
+ |
+echo "Debugging $PACKAGE.$ACTIVITY..." |
+ |
source $SCRIPT_DIR/utils/setup_adb.sh |
@@ -34,13 +39,13 @@ adb_push_if_needed $ANDROID_TOOLCHAIN/gdbserver /data/local/tmp |
# Launch the app |
echo "Launching the app..." |
-$ADB $DEVICE_SERIAL shell am start -n com.skia.sample_app/com.skia.SkiaSampleActivity |
+$ADB $DEVICE_SERIAL shell am start -n $PACKAGE/.$ACTIVITY |
# Wait for app process to initialize |
sleep 2 |
# Attach gdbserver to the app process |
-PID=$($ADB shell ps | grep com.skia.sample_app | awk '{print $2}') |
+PID=$($ADB shell ps | grep $PACKAGE | awk '{print $2}') |
echo "Attaching to pid: $PID" |
$ADB $DEVICE_SERIAL shell /data/local/tmp/gdbserver :$PORT --attach $PID & |