gdbclient.py: Try ro.build.product also.
ro.product.name can be individual device name and not the lunch target
name.
466e289dc83e15a88304f7c1359471d741a3551d removed this check but we
still need this.
Bug: 166071019
Test: gdbclient.py -n vold # on eve
Change-Id: I60fc20e6cc02ca6dd01fef609c7f60e76c580876
diff --git a/scripts/gdbclient.py b/scripts/gdbclient.py
index 2665261..2d2dfcb 100755
--- a/scripts/gdbclient.py
+++ b/scripts/gdbclient.py
@@ -129,11 +129,11 @@
def verify_device(root, device):
- name = device.get_prop("ro.product.name")
+ names = set([device.get_prop("ro.build.product"), device.get_prop("ro.product.name")])
target_device = os.environ["TARGET_PRODUCT"]
- if target_device != name:
+ if target_device not in names:
msg = "TARGET_PRODUCT ({}) does not match attached device ({})"
- sys.exit(msg.format(target_device, name))
+ sys.exit(msg.format(target_device, ", ".join(names)))
def get_remote_pid(device, process_name):