Lines Matching refs:device_id

79     def get_filepaths(self, device_id):  argument
92 def get_filepaths(self, device_id): argument
94 f"shell su root find {self.path} -name {self.matcher}", device_id)
110 def get_filepaths(self, device_id): argument
112 files = matcher.get_filepaths(device_id)
465 def process_with_device(self, server, path, device_id): argument
479 def process_with_device(self, server, path, device_id): argument
493 file_paths = f.get_filepaths(device_id)
500 file_path, tmp, device_id)
502 call_adb('shell su root rm ' + file_path, device_id)
518 def check_root(device_id): argument
519 log.debug("Checking root access on {}".format(device_id))
520 return call_adb('shell su root id -u', device_id) == "0\n"
527 def __init__(self, device_id, command): argument
530 self._device_id = device_id
625 def process_with_device(self, server, path, device_id): argument
631 if device_id in TRACE_THREADS:
632 log.warning("Trace already in progress for {}", device_id)
634 if not check_root(device_id):
637 device_id))
642 device_id, ','.join(requested_types)))
643 TRACE_THREADS[device_id] = TraceThread(
644 device_id, command.encode('utf-8'))
645 TRACE_THREADS[device_id].start()
650 def process_with_device(self, server, path, device_id): argument
651 if device_id not in TRACE_THREADS:
652 raise BadRequest("No trace in progress for {}".format(device_id))
653 if TRACE_THREADS[device_id].is_alive():
654 TRACE_THREADS[device_id].end_trace()
656 success = TRACE_THREADS[device_id].success()
657 out = TRACE_THREADS[device_id].out + \
658 b"\n" + TRACE_THREADS[device_id].err
659 command = TRACE_THREADS[device_id].trace_command
660 TRACE_THREADS.pop(device_id)
666 …"utf-8") + "\n### Command: adb -s {} shell ###\n### Input ###\n".format(device_id) + command.decod…
670 def execute_command(server, device_id, shell, configType, configValue): argument
683 def process_with_device(self, server, path, device_id): argument
694 if device_id in TRACE_THREADS:
696 if not check_root(device_id):
700 shell = ['adb', '-s', device_id, 'shell']
702 execute_command(server, device_id, shell, "sf buffer size", command)
705 def add_selected_request_to_config(self, server, device_id, config): argument
716 if device_id in TRACE_THREADS:
718 if not check_root(device_id):
725 def process_with_device(self, server, path, device_id): argument
727 config = add_selected_request_to_config(self, server, device_id, config)
729 shell = ['adb', '-s', device_id, 'shell']
731 execute_command(server, device_id, shell, "sf buffer size", setBufferSize)
735 def process_with_device(self, server, path, device_id): argument
737 config = add_selected_request_to_config(self, server, device_id, config)
741 shell = ['adb', '-s', device_id, 'shell']
743 execute_command(server, device_id, shell, "wm buffer size", setBufferSize)
744 execute_command(server, device_id, shell, "tracing type", setTracingType)
745 execute_command(server, device_id, shell, "tracing level", setTracingLevel)
749 def process_with_device(self, server, path, device_id): argument
750 if device_id not in TRACE_THREADS:
751 raise BadRequest("No trace in progress for {}".format(device_id))
752 TRACE_THREADS[device_id].reset_timer()
754 TRACE_THREADS[device_id].is_alive()).encode("utf-8"), "text/plain")
758 def process_with_device(self, server, path, device_id): argument
764 if device_id in TRACE_THREADS:
765 BadRequest("Trace in progress for {}".format(device_id))
766 if not check_root(device_id):
769 .format(device_id))
771 shell = ['adb', '-s', device_id, 'shell']
775 log.debug("Starting dump on device {}".format(device_id))
780 log.debug("Dump finished on device {}".format(device_id))