Lines Matching refs:device
84 def get_tracer_pid(device, pid):
88 line, _ = device.shell(["grep", "-e", "^TracerPid:", "/proc/{}/status".format(pid)])
106 help="run a binary on the device, with args")
113 help="user to run commands as on the device [default: root]")
135 def verify_device(root, device):
136 names = set([device.get_prop("ro.build.product"), device.get_prop("ro.product.name")])
139 msg = "TARGET_PRODUCT ({}) does not match attached device ({})"
143 def get_remote_pid(device, process_name):
144 processes = gdbrunner.get_processes(device)
164 def ensure_linker(device, sysroot, interp):
165 """Ensure that the device's linker exists on the host.
167 PT_INTERP is usually /system/bin/linker[64], but on the device, that file is
176 ${sysroot} at all, so copy the linker from the device.
193 # If the linker on the device is a symlink, search for the symlink's target
195 interp_real, _ = device.shell(["realpath", interp])
211 device.pull(interp, os.path.join(result, posixpath.basename(interp)))
227 device = args.device
239 pid = get_remote_pid(device, args.target_name)
246 run_cmd[0] = gdbrunner.find_executable_path(device, args.run_cmd[0],
252 binary_file, local = gdbrunner.find_file(device, run_cmd[0], sysroot,
257 binary_file, local = gdbrunner.find_binary(device, pid, sysroot,
344 # Try to connect for a few seconds, sometimes the device gdbserver takes
359 print("Error: unable to connect to device.")
431 device = args.device
433 if device is None:
434 sys.exit("ERROR: Failed to find device.")
452 # Make sure the environment matches the attached device.
453 verify_device(root, device)
479 linker_search_dir = ensure_linker(device, sysroot, interp)
481 tracer_pid = get_tracer_pid(device, pid)
501 device, server_local_path, server_remote_path,
508 gdbrunner.forward_gdbserver_port(device, local=args.port,