(self, crashed=False)
| 463 | open(new_log, "w+").write(log) |
| 464 | |
| 465 | def pull_fuzzdata(self, crashed=False): |
| 466 | logging.debug(f"[ORC] downloading fuzzing data") |
| 467 | |
| 468 | curr_run_dir = None |
| 469 | if self.do_dump: |
| 470 | curr_run_dir = os.path.join(self.fuzz_runs_dir, str(self.curr_run)) |
| 471 | os.system(f'mkdir -p {curr_run_dir}') |
| 472 | |
| 473 | out, _ = adb.execute_privileged_command( |
| 474 | f"ls {FUZZER_PATH}", device_id=self.device_id |
| 475 | ) |
| 476 | out = out.decode().split("\n") |
| 477 | for f in out: |
| 478 | if f.startswith("crash-"): |
| 479 | adb.pull_privileged( |
| 480 | f"{FUZZER_PATH}/{f}", |
| 481 | self.fuzz_out_dir, |
| 482 | device_id=self.device_id, |
| 483 | ) |
| 484 | if curr_run_dir is not None: |
| 485 | adb.pull_privileged( |
| 486 | f"{FUZZER_PATH}/{f}", |
| 487 | curr_run_dir, |
| 488 | device_id=self.device_id, |
| 489 | ) |
| 490 | if f.startswith("strongbinder-"): |
| 491 | adb.pull_privileged( |
| 492 | f"{FUZZER_PATH}/{f}", |
| 493 | self.fuzz_out_dir, |
| 494 | device_id=self.device_id, |
| 495 | ) |
| 496 | if curr_run_dir is not None: |
| 497 | adb.pull_privileged( |
| 498 | f"{FUZZER_PATH}/{f}", |
| 499 | curr_run_dir, |
| 500 | device_id=self.device_id, |
| 501 | ) |
| 502 | adb.pull_privileged( |
| 503 | FUZZ_DATA_PATH, |
| 504 | self.fuzz_out_dir, |
| 505 | device_id=self.device_id, |
| 506 | is_directory=True, |
| 507 | ) |
| 508 | adb.pull_privileged( |
| 509 | f"{FUZZ_DATA_PATH}/deserializers_used.txt", |
| 510 | self.fuzz_out_dir, |
| 511 | device_id=self.device_id, |
| 512 | ) |
| 513 | adb.pull_privileged( |
| 514 | LIBFUZZ_LOG, self.fuzz_out_dir, device_id=self.device_id |
| 515 | ) |
| 516 | adb.pull_privileged( |
| 517 | LIBFUZZ_LOG, |
| 518 | os.path.join( |
| 519 | self.fuzz_out_logs, |
| 520 | f"{self.nr_device_borked+self.nr_service_crashed}_log.txt", |
| 521 | ), |
| 522 | device_id=self.device_id, |
no test coverage detected