| Index: build/android/adb_chrome_public_command_line
|
| diff --git a/chromecast/tools/apk_command_line b/build/android/adb_chrome_public_command_line
|
| similarity index 58%
|
| copy from chromecast/tools/apk_command_line
|
| copy to build/android/adb_chrome_public_command_line
|
| index 0fd0001d643a9e5f3b442c7da6bf98c61dd19f0f..efbd6ff9d8bcafac5d863c683539a4946208cb1c 100755
|
| --- a/chromecast/tools/apk_command_line
|
| +++ b/build/android/adb_chrome_public_command_line
|
| @@ -1,22 +1,22 @@
|
| #!/bin/bash
|
| #
|
| -# Copyright 2014 The Chromium Authors. All rights reserved.
|
| +# 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.
|
|
|
| -# If no flags are given, prints the current cast shell flags.
|
| +# If no flags are given, prints the current Chrome flags.
|
| #
|
| -# Otherwise, the given flags are used to REPLACE (not modify) the cast shell
|
| +# Otherwise, the given flags are used to REPLACE (not modify) the Chrome
|
| # flags. For example:
|
| -# apk_command_line --enable-webgl
|
| +# adb_chrome_public_command_line --enable-webgl
|
| #
|
| -# To remove all content shell flags, pass an empty string for the flags:
|
| -# apk_command_line ""
|
| +# To remove all Chrome flags, pass an empty string for the flags:
|
| +# adb_chrome_public_command_line ""
|
|
|
| -CMD_LINE_FILE=/data/local/tmp/castshell-command-line
|
| +CMD_LINE_FILE=/data/local/chrome-command-line
|
|
|
| if [ $# -eq 0 ] ; then
|
| - # If nothing specified, print the command line (stripping off "castshell")
|
| + # If nothing specified, print the command line (stripping off "chrome")
|
| tempfile=$(tempfile)
|
| adb pull $CMD_LINE_FILE $tempfile 2>/dev/null
|
| if [ $? -eq 0 ] ; then
|
| @@ -26,11 +26,12 @@ if [ $# -eq 0 ] ; then
|
| elif [ $# -eq 1 ] && [ "$1" = '' ] ; then
|
| # If given an empty string, delete the command line.
|
| set -x
|
| - adb shell rm $CMD_LINE_FILE >/dev/null
|
| + adb shell su -c rm $CMD_LINE_FILE >/dev/null
|
| else
|
| # Else set it.
|
| set -x
|
| - adb shell "echo 'castshell $*' > $CMD_LINE_FILE"
|
| + adb shell "echo 'chrome $*' | su -c dd of=$CMD_LINE_FILE"
|
| # Prevent other apps from modifying flags -- this can create security issues.
|
| - adb shell chmod 0664 $CMD_LINE_FILE
|
| + adb shell su -c chmod 0664 $CMD_LINE_FILE
|
| fi
|
| +
|
|
|