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

Side by Side Diff: sky/tools/skydb

Issue 1138343002: Bump versionCode of SkyDemo.apk to avoid downgrade warning. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 | « sky/tools/shelldb ('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
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 from skypy.skyserver import SkyServer 6 from skypy.skyserver import SkyServer
7 import argparse 7 import argparse
8 import json 8 import json
9 import logging 9 import logging
10 import os 10 import os
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 self.pids['build_dir'] = self.paths.build_dir 220 self.pids['build_dir'] = self.paths.build_dir
221 self.pids['sky_command_port'] = args.command_port 221 self.pids['sky_command_port'] = args.command_port
222 222
223 if is_android: 223 if is_android:
224 # TODO(eseidel): This should move into a helper method and handle 224 # TODO(eseidel): This should move into a helper method and handle
225 # failures with nice messages explaining how to get root. 225 # failures with nice messages explaining how to get root.
226 subprocess.check_call([ADB_PATH, 'root']) 226 subprocess.check_call([ADB_PATH, 'root'])
227 227
228 # We could make installing conditional on an argument. 228 # We could make installing conditional on an argument.
229 subprocess.check_call([ADB_PATH, 'install', '-r', apk_path]) 229 # -r to replace an existing apk, -d to allow version downgrade.
230 subprocess.check_call([ADB_PATH, 'install', '-r', '-d', apk_path])
230 231
231 port_string = 'tcp:%s' % sky_server.port 232 port_string = 'tcp:%s' % sky_server.port
232 subprocess.check_call([ 233 subprocess.check_call([
233 ADB_PATH, 'reverse', port_string, port_string 234 ADB_PATH, 'reverse', port_string, port_string
234 ]) 235 ])
235 self.pids['remote_sky_server_port'] = sky_server.port 236 self.pids['remote_sky_server_port'] = sky_server.port
236 237
237 port_string = 'tcp:%s' % args.command_port 238 port_string = 'tcp:%s' % args.command_port
238 subprocess.check_call([ 239 subprocess.check_call([
239 ADB_PATH, 'forward', port_string, port_string 240 ADB_PATH, 'forward', port_string, port_string
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 load_parser.set_defaults(func=self.load_command) 625 load_parser.set_defaults(func=self.load_command)
625 626
626 args = parser.parse_args() 627 args = parser.parse_args()
627 args.func(args) 628 args.func(args)
628 629
629 self._write_pid_file(PID_FILE_PATH, self.pids) 630 self._write_pid_file(PID_FILE_PATH, self.pids)
630 631
631 632
632 if __name__ == '__main__': 633 if __name__ == '__main__':
633 SkyDebugger().main() 634 SkyDebugger().main()
OLDNEW
« no previous file with comments | « sky/tools/shelldb ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698