Index: build/android/adb_kill_android_webview_shell |
diff --git a/build/android/adb_kill_android_webview_shell b/build/android/adb_kill_android_webview_shell |
new file mode 100755 |
index 0000000000000000000000000000000000000000..5f287f0826642b4c61fbd1c319a01ee8e09d7f75 |
--- /dev/null |
+++ b/build/android/adb_kill_android_webview_shell |
@@ -0,0 +1,24 @@ |
+#!/bin/bash |
+# |
+# Copyright 2015 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+# |
+# Kill a running android webview shell. |
+# |
+# Assumes you have sourced the build/android/envsetup.sh script. |
+ |
+SHELL_PID_LINES=$(adb shell ps | grep ' org.chromium.android_webview.shell') |
+VAL=$(echo "$SHELL_PID_LINES" | wc -l) |
+if [ $VAL -lt 1 ] ; then |
+ echo "Not running android webview shell." |
+else |
+ SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}') |
+ if [ "$SHELL_PID" != "" ] ; then |
+ set -x |
+ adb shell kill $SHELL_PID |
+ set - |
+ else |
+ echo "Android webview shell does not appear to be running." |
+ fi |
+fi |