| 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(gsutil, adb='adb'): |
| 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 |