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

Side by Side Diff: chromecast/tools/apk_command_line

Issue 1750393003: Replaced apk_command_line with adb_cast_shell_command_line. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits Created 4 years, 9 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
« no previous file with comments | « build/android/adb_command_line.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash
2 #
3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 # If no flags are given, prints the current cast shell flags.
8 #
9 # Otherwise, the given flags are used to REPLACE (not modify) the cast shell
10 # flags. For example:
11 # apk_command_line --enable-webgl
12 #
13 # To remove all content shell flags, pass an empty string for the flags:
14 # apk_command_line ""
15
16 CMD_LINE_FILE=/data/local/tmp/castshell-command-line
17
18 if [ $# -eq 0 ] ; then
19 # If nothing specified, print the command line (stripping off "castshell")
20 tempfile=$(tempfile)
21 adb pull $CMD_LINE_FILE $tempfile 2>/dev/null
22 if [ $? -eq 0 ] ; then
23 rm $tempfile
24 adb shell cat $CMD_LINE_FILE | cut -d " " -f "2-" 2>/dev/null
25 fi
26 elif [ $# -eq 1 ] && [ "$1" = '' ] ; then
27 # If given an empty string, delete the command line.
28 set -x
29 adb shell rm $CMD_LINE_FILE >/dev/null
30 else
31 # Else set it.
32 set -x
33 adb shell "echo 'castshell $*' > $CMD_LINE_FILE"
34 # Prevent other apps from modifying flags -- this can create security issues.
35 adb shell chmod 0664 $CMD_LINE_FILE
36 fi
OLDNEW
« no previous file with comments | « build/android/adb_command_line.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698