| Felipe Leme | 698e065 | 2016-07-19 17:07:22 -0700 | [diff] [blame] | 1 | /* | 
|  | 2 | * Copyright (C) 2016 The Android Open Source Project | 
|  | 3 | * | 
|  | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | * you may not use this file except in compliance with the License. | 
|  | 6 | * You may obtain a copy of the License at | 
|  | 7 | * | 
|  | 8 | *      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | * | 
|  | 10 | * Unless required by applicable law or agreed to in writing, software | 
|  | 11 | * distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | * See the License for the specific language governing permissions and | 
|  | 14 | * limitations under the License. | 
|  | 15 | */ | 
|  | 16 |  | 
| Felipe Leme | f33fcb6 | 2016-08-04 12:03:06 -0700 | [diff] [blame] | 17 | #define TRACE_TAG ADB | 
|  | 18 |  | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 19 | #include "bugreport.h" | 
|  | 20 |  | 
| Felipe Leme | 698e065 | 2016-07-19 17:07:22 -0700 | [diff] [blame] | 21 | #include <string> | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 22 | #include <vector> | 
| Felipe Leme | 698e065 | 2016-07-19 17:07:22 -0700 | [diff] [blame] | 23 |  | 
| Elliott Hughes | da46b39 | 2016-10-11 17:09:00 -0700 | [diff] [blame] | 24 | #include <android-base/parseint.h> | 
| Felipe Leme | 698e065 | 2016-07-19 17:07:22 -0700 | [diff] [blame] | 25 | #include <android-base/strings.h> | 
|  | 26 |  | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 27 | #include "sysdeps.h" | 
|  | 28 | #include "adb_utils.h" | 
| Felipe Leme | 698e065 | 2016-07-19 17:07:22 -0700 | [diff] [blame] | 29 | #include "file_sync_service.h" | 
|  | 30 |  | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 31 | static constexpr char BUGZ_BEGIN_PREFIX[] = "BEGIN:"; | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 32 | static constexpr char BUGZ_PROGRESS_PREFIX[] = "PROGRESS:"; | 
|  | 33 | static constexpr char BUGZ_PROGRESS_SEPARATOR[] = "/"; | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 34 | static constexpr char BUGZ_OK_PREFIX[] = "OK:"; | 
|  | 35 | static constexpr char BUGZ_FAIL_PREFIX[] = "FAIL:"; | 
| Felipe Leme | 698e065 | 2016-07-19 17:07:22 -0700 | [diff] [blame] | 36 |  | 
| Felipe Leme | 0d4f050 | 2016-07-26 12:14:39 -0700 | [diff] [blame] | 37 | // Custom callback used to handle the output of zipped bugreports. | 
|  | 38 | class BugreportStandardStreamsCallback : public StandardStreamsCallbackInterface { | 
|  | 39 | public: | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 40 | BugreportStandardStreamsCallback(const std::string& dest_dir, const std::string& dest_file, | 
|  | 41 | bool show_progress, Bugreport* br) | 
| Felipe Leme | daf4628 | 2016-07-27 19:23:09 -0700 | [diff] [blame] | 42 | : br_(br), | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 43 | src_file_(), | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 44 | dest_dir_(dest_dir), | 
| Felipe Leme | daf4628 | 2016-07-27 19:23:09 -0700 | [diff] [blame] | 45 | dest_file_(dest_file), | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 46 | line_message_(), | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 47 | invalid_lines_(), | 
| Felipe Leme | daf4628 | 2016-07-27 19:23:09 -0700 | [diff] [blame] | 48 | show_progress_(show_progress), | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 49 | status_(0), | 
| Felipe Leme | daf4628 | 2016-07-27 19:23:09 -0700 | [diff] [blame] | 50 | line_() { | 
| Felipe Leme | 680f4a4 | 2016-08-15 16:01:58 -0700 | [diff] [blame] | 51 | SetLineMessage("generating"); | 
| Felipe Leme | 0d4f050 | 2016-07-26 12:14:39 -0700 | [diff] [blame] | 52 | } | 
|  | 53 |  | 
|  | 54 | void OnStdout(const char* buffer, int length) { | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 55 | for (int i = 0; i < length; i++) { | 
|  | 56 | char c = buffer[i]; | 
|  | 57 | if (c == '\n') { | 
|  | 58 | ProcessLine(line_); | 
|  | 59 | line_.clear(); | 
|  | 60 | } else { | 
|  | 61 | line_.append(1, c); | 
|  | 62 | } | 
|  | 63 | } | 
| Felipe Leme | 0d4f050 | 2016-07-26 12:14:39 -0700 | [diff] [blame] | 64 | } | 
|  | 65 |  | 
|  | 66 | void OnStderr(const char* buffer, int length) { | 
|  | 67 | OnStream(nullptr, stderr, buffer, length); | 
|  | 68 | } | 
| Felipe Leme | 0d4f050 | 2016-07-26 12:14:39 -0700 | [diff] [blame] | 69 | int Done(int unused_) { | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 70 | // Process remaining line, if any. | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 71 | ProcessLine(line_); | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 72 |  | 
|  | 73 | // Warn about invalid lines, if any. | 
|  | 74 | if (!invalid_lines_.empty()) { | 
|  | 75 | fprintf(stderr, | 
|  | 76 | "WARNING: bugreportz generated %zu line(s) with unknown commands, " | 
|  | 77 | "device might not support zipped bugreports:\n", | 
|  | 78 | invalid_lines_.size()); | 
|  | 79 | for (const auto& line : invalid_lines_) { | 
|  | 80 | fprintf(stderr, "\t%s\n", line.c_str()); | 
|  | 81 | } | 
|  | 82 | fprintf(stderr, | 
|  | 83 | "If the zipped bugreport was not generated, try 'adb bugreport' instead.\n"); | 
|  | 84 | } | 
|  | 85 |  | 
|  | 86 | // Pull the generated bug report. | 
|  | 87 | if (status_ == 0) { | 
|  | 88 | if (src_file_.empty()) { | 
|  | 89 | fprintf(stderr, "bugreportz did not return a '%s' or '%s' line\n", BUGZ_OK_PREFIX, | 
|  | 90 | BUGZ_FAIL_PREFIX); | 
|  | 91 | return -1; | 
|  | 92 | } | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 93 | std::string destination; | 
|  | 94 | if (dest_dir_.empty()) { | 
|  | 95 | destination = dest_file_; | 
|  | 96 | } else { | 
|  | 97 | destination = android::base::StringPrintf("%s%c%s", dest_dir_.c_str(), | 
|  | 98 | OS_PATH_SEPARATOR, dest_file_.c_str()); | 
|  | 99 | } | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 100 | std::vector<const char*> srcs{src_file_.c_str()}; | 
| Felipe Leme | 680f4a4 | 2016-08-15 16:01:58 -0700 | [diff] [blame] | 101 | SetLineMessage("pulling"); | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 102 | status_ = | 
|  | 103 | br_->DoSyncPull(srcs, destination.c_str(), true, line_message_.c_str()) ? 0 : 1; | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 104 | if (status_ != 0) { | 
|  | 105 | fprintf(stderr, | 
|  | 106 | "Bug report finished but could not be copied to '%s'.\n" | 
|  | 107 | "Try to run 'adb pull %s <directory>'\n" | 
|  | 108 | "to copy it to a directory that can be written.\n", | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 109 | destination.c_str(), src_file_.c_str()); | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 110 | } | 
|  | 111 | } | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 112 | return status_; | 
| Felipe Leme | 0d4f050 | 2016-07-26 12:14:39 -0700 | [diff] [blame] | 113 | } | 
|  | 114 |  | 
|  | 115 | private: | 
| Felipe Leme | 680f4a4 | 2016-08-15 16:01:58 -0700 | [diff] [blame] | 116 | void SetLineMessage(const std::string& action) { | 
|  | 117 | line_message_ = action + " " + adb_basename(dest_file_); | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 118 | } | 
|  | 119 |  | 
|  | 120 | void SetSrcFile(const std::string path) { | 
|  | 121 | src_file_ = path; | 
|  | 122 | if (!dest_dir_.empty()) { | 
|  | 123 | // Only uses device-provided name when user passed a directory. | 
|  | 124 | dest_file_ = adb_basename(path); | 
| Felipe Leme | 680f4a4 | 2016-08-15 16:01:58 -0700 | [diff] [blame] | 125 | SetLineMessage("generating"); | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 126 | } | 
|  | 127 | } | 
|  | 128 |  | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 129 | void ProcessLine(const std::string& line) { | 
|  | 130 | if (line.empty()) return; | 
|  | 131 |  | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 132 | if (android::base::StartsWith(line, BUGZ_BEGIN_PREFIX)) { | 
|  | 133 | SetSrcFile(&line[strlen(BUGZ_BEGIN_PREFIX)]); | 
|  | 134 | } else if (android::base::StartsWith(line, BUGZ_OK_PREFIX)) { | 
|  | 135 | SetSrcFile(&line[strlen(BUGZ_OK_PREFIX)]); | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 136 | } else if (android::base::StartsWith(line, BUGZ_FAIL_PREFIX)) { | 
|  | 137 | const char* error_message = &line[strlen(BUGZ_FAIL_PREFIX)]; | 
|  | 138 | fprintf(stderr, "Device failed to take a zipped bugreport: %s\n", error_message); | 
|  | 139 | status_ = -1; | 
|  | 140 | } else if (show_progress_ && android::base::StartsWith(line, BUGZ_PROGRESS_PREFIX)) { | 
|  | 141 | // progress_line should have the following format: | 
|  | 142 | // | 
|  | 143 | // BUGZ_PROGRESS_PREFIX:PROGRESS/TOTAL | 
|  | 144 | // | 
|  | 145 | size_t idx1 = line.rfind(BUGZ_PROGRESS_PREFIX) + strlen(BUGZ_PROGRESS_PREFIX); | 
|  | 146 | size_t idx2 = line.rfind(BUGZ_PROGRESS_SEPARATOR); | 
| Elliott Hughes | da46b39 | 2016-10-11 17:09:00 -0700 | [diff] [blame] | 147 | int progress, total; | 
|  | 148 | if (android::base::ParseInt(line.substr(idx1, (idx2 - idx1)), &progress) && | 
|  | 149 | android::base::ParseInt(line.substr(idx2 + 1), &total)) { | 
|  | 150 | br_->UpdateProgress(line_message_, progress, total); | 
|  | 151 | } | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 152 | } else { | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 153 | invalid_lines_.push_back(line); | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 154 | } | 
|  | 155 | } | 
|  | 156 |  | 
| Felipe Leme | 0d4f050 | 2016-07-26 12:14:39 -0700 | [diff] [blame] | 157 | Bugreport* br_; | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 158 |  | 
|  | 159 | // Path of bugreport on device. | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 160 | std::string src_file_; | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 161 |  | 
|  | 162 | // Bugreport destination on host, depending on argument passed on constructor: | 
|  | 163 | // - if argument is a directory, dest_dir_ is set with it and dest_file_ will be the name | 
|  | 164 | //   of the bugreport reported by the device. | 
|  | 165 | // - if argument is empty, dest_dir is set as the current directory and dest_file_ will be the | 
|  | 166 | //   name of the bugreport reported by the device. | 
|  | 167 | // - otherwise, dest_dir_ is not set and dest_file_ is set with the value passed on constructor. | 
|  | 168 | std::string dest_dir_, dest_file_; | 
|  | 169 |  | 
|  | 170 | // Message displayed on LinePrinter, it's updated every time the destination above change. | 
|  | 171 | std::string line_message_; | 
|  | 172 |  | 
|  | 173 | // Lines sent by bugreportz that contain invalid commands; will be displayed at the end. | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 174 | std::vector<std::string> invalid_lines_; | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 175 |  | 
|  | 176 | // Whether PROGRESS_LINES should be interpreted as progress. | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 177 | bool show_progress_; | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 178 |  | 
|  | 179 | // Overall process of the operation, as returned by Done(). | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 180 | int status_; | 
|  | 181 |  | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 182 | // Temporary buffer containing the characters read since the last newline (\n). | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 183 | std::string line_; | 
| Felipe Leme | 0d4f050 | 2016-07-26 12:14:39 -0700 | [diff] [blame] | 184 |  | 
|  | 185 | DISALLOW_COPY_AND_ASSIGN(BugreportStandardStreamsCallback); | 
|  | 186 | }; | 
|  | 187 |  | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 188 | // Implemented in commandline.cpp | 
|  | 189 | int usage(); | 
|  | 190 |  | 
| Felipe Leme | 698e065 | 2016-07-19 17:07:22 -0700 | [diff] [blame] | 191 | int Bugreport::DoIt(TransportType transport_type, const char* serial, int argc, const char** argv) { | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 192 | if (argc > 2) return usage(); | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 193 |  | 
|  | 194 | // Gets bugreportz version. | 
| Felipe Leme | f33fcb6 | 2016-08-04 12:03:06 -0700 | [diff] [blame] | 195 | std::string bugz_stdout, bugz_stderr; | 
|  | 196 | DefaultStandardStreamsCallback version_callback(&bugz_stdout, &bugz_stderr); | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 197 | int status = SendShellCommand(transport_type, serial, "bugreportz -v", false, &version_callback); | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 198 | std::string bugz_version = android::base::Trim(bugz_stderr); | 
| Felipe Leme | f33fcb6 | 2016-08-04 12:03:06 -0700 | [diff] [blame] | 199 | std::string bugz_output = android::base::Trim(bugz_stdout); | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 200 |  | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 201 | if (status != 0 || bugz_version.empty()) { | 
| Felipe Leme | f33fcb6 | 2016-08-04 12:03:06 -0700 | [diff] [blame] | 202 | D("'bugreportz' -v results: status=%d, stdout='%s', stderr='%s'", status, | 
|  | 203 | bugz_output.c_str(), bugz_version.c_str()); | 
|  | 204 | if (argc == 1) { | 
|  | 205 | // Device does not support bugreportz: if called as 'adb bugreport', just falls out to | 
|  | 206 | // the flat-file version. | 
|  | 207 | fprintf(stderr, | 
|  | 208 | "Failed to get bugreportz version, which is only available on devices " | 
|  | 209 | "running Android 7.0 or later.\nTrying a plain-text bug report instead.\n"); | 
|  | 210 | return SendShellCommand(transport_type, serial, "bugreport", false); | 
|  | 211 | } | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 212 |  | 
|  | 213 | // But if user explicitly asked for a zipped bug report, fails instead (otherwise calling | 
| Felipe Leme | f33fcb6 | 2016-08-04 12:03:06 -0700 | [diff] [blame] | 214 | // 'bugreport' would generate a lot of output the user might not be prepared to handle). | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 215 | fprintf(stderr, | 
|  | 216 | "Failed to get bugreportz version: 'bugreportz -v' returned '%s' (code %d).\n" | 
| Felipe Leme | f33fcb6 | 2016-08-04 12:03:06 -0700 | [diff] [blame] | 217 | "If the device does not run Android 7.0 or above, try 'adb bugreport' instead.\n", | 
|  | 218 | bugz_output.c_str(), status); | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 219 | return status != 0 ? status : -1; | 
|  | 220 | } | 
|  | 221 |  | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 222 | std::string dest_file, dest_dir; | 
|  | 223 |  | 
|  | 224 | if (argc == 1) { | 
|  | 225 | // No args - use current directory | 
|  | 226 | if (!getcwd(&dest_dir)) { | 
|  | 227 | perror("adb: getcwd failed"); | 
|  | 228 | return 1; | 
|  | 229 | } | 
|  | 230 | } else { | 
|  | 231 | // Check whether argument is a directory or file | 
|  | 232 | if (directory_exists(argv[1])) { | 
|  | 233 | dest_dir = argv[1]; | 
|  | 234 | } else { | 
|  | 235 | dest_file = argv[1]; | 
|  | 236 | } | 
|  | 237 | } | 
|  | 238 |  | 
|  | 239 | if (dest_file.empty()) { | 
|  | 240 | // Uses a default value until device provides the proper name | 
|  | 241 | dest_file = "bugreport.zip"; | 
|  | 242 | } else { | 
| Elliott Hughes | 7acce1b | 2016-10-25 17:24:54 -0700 | [diff] [blame] | 243 | if (!android::base::EndsWithIgnoreCase(dest_file, ".zip")) { | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 244 | dest_file += ".zip"; | 
|  | 245 | } | 
|  | 246 | } | 
|  | 247 |  | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 248 | bool show_progress = true; | 
|  | 249 | std::string bugz_command = "bugreportz -p"; | 
|  | 250 | if (bugz_version == "1.0") { | 
|  | 251 | // 1.0 does not support progress notifications, so print a disclaimer | 
|  | 252 | // message instead. | 
|  | 253 | fprintf(stderr, | 
|  | 254 | "Bugreport is in progress and it could take minutes to complete.\n" | 
|  | 255 | "Please be patient and do not cancel or disconnect your device " | 
| Felipe Leme | 6e28696 | 2016-07-29 15:47:00 -0700 | [diff] [blame] | 256 | "until it completes.\n"); | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 257 | show_progress = false; | 
|  | 258 | bugz_command = "bugreportz"; | 
|  | 259 | } | 
| Felipe Leme | b323972 | 2016-07-29 17:57:00 -0700 | [diff] [blame] | 260 | BugreportStandardStreamsCallback bugz_callback(dest_dir, dest_file, show_progress, this); | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 261 | return SendShellCommand(transport_type, serial, bugz_command, false, &bugz_callback); | 
|  | 262 | } | 
|  | 263 |  | 
| Felipe Leme | daf4628 | 2016-07-27 19:23:09 -0700 | [diff] [blame] | 264 | void Bugreport::UpdateProgress(const std::string& message, int progress, int total) { | 
| Felipe Leme | 6f5080f | 2016-07-26 12:23:40 -0700 | [diff] [blame] | 265 | int progress_percentage = (progress * 100 / total); | 
| Felipe Leme | daf4628 | 2016-07-27 19:23:09 -0700 | [diff] [blame] | 266 | line_printer_.Print( | 
|  | 267 | android::base::StringPrintf("[%3d%%] %s", progress_percentage, message.c_str()), | 
|  | 268 | LinePrinter::INFO); | 
| Felipe Leme | 698e065 | 2016-07-19 17:07:22 -0700 | [diff] [blame] | 269 | } | 
|  | 270 |  | 
|  | 271 | int Bugreport::SendShellCommand(TransportType transport_type, const char* serial, | 
|  | 272 | const std::string& command, bool disable_shell_protocol, | 
| Felipe Leme | 0d4f050 | 2016-07-26 12:14:39 -0700 | [diff] [blame] | 273 | StandardStreamsCallbackInterface* callback) { | 
|  | 274 | return send_shell_command(transport_type, serial, command, disable_shell_protocol, callback); | 
| Felipe Leme | 698e065 | 2016-07-19 17:07:22 -0700 | [diff] [blame] | 275 | } | 
|  | 276 |  | 
|  | 277 | bool Bugreport::DoSyncPull(const std::vector<const char*>& srcs, const char* dst, bool copy_attrs, | 
|  | 278 | const char* name) { | 
|  | 279 | return do_sync_pull(srcs, dst, copy_attrs, name); | 
|  | 280 | } |