Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import android_gdb.config as config | |
| 6 import subprocess | |
| 7 import tempfile | |
| 8 | |
| 9 | |
| 10 def install_binary(gsutil, adb='adb'): | |
|
ppi
2015/07/09 13:12:38
install_binary -> install_remote_file_reader
qsr
2015/07/09 13:54:18
Given the name of the python package, what about j
etiennej
2015/07/15 07:13:20
Done.
| |
| 11 verification_call_output = subprocess.check_output( | |
| 12 [adb, 'shell', 'ls', config.REMOTE_FILE_READER_DEVICE_PATH]) | |
| 13 if config.REMOTE_FILE_READER_DEVICE_PATH != verification_call_output.strip(): | |
| 14 with tempfile.NamedTemporaryFile() as temp_file: | |
| 15 subprocess.check_call([gsutil, 'cp', config.REMOTE_FILE_READER_CLOUD_PATH, | |
| 16 temp_file.name]) | |
| 17 subprocess.check_call([adb, 'push', temp_file.name, | |
| 18 config.REMOTE_FILE_READER_DEVICE_PATH]) | |
| 19 subprocess.check_call([adb, 'shell', 'chmod', '777', | |
| 20 config.REMOTE_FILE_READER_DEVICE_PATH]) | |
| OLD | NEW |