Clarify meaning of --port flag

Also, edited error message when lunch menu is incorrect.

Change-Id: Ie9f5a00b8560d938212eb2b38713a6343d175958
This commit is contained in:
AdityaK
2023-07-14 16:02:43 -07:00
parent 981424a4b8
commit 50c9af7a63

View File

@@ -90,7 +90,7 @@ def parse_args() -> argparse.Namespace:
parser.add_argument( parser.add_argument(
"--port", nargs="?", default="5039", "--port", nargs="?", default="5039",
help="override the port used on the host [default: 5039]") help="Unused **host** port to forward the debug_socket to.[default: 5039]")
parser.add_argument( parser.add_argument(
"--user", nargs="?", default="root", "--user", nargs="?", default="root",
help="user to run commands as on the device [default: root]") help="user to run commands as on the device [default: root]")
@@ -121,7 +121,7 @@ def verify_device(device: adb.AndroidDevice) -> None:
names = set([device.get_prop("ro.build.product"), 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"] target_device = os.environ["TARGET_PRODUCT"]
if target_device not in names: if target_device not in names:
msg = "TARGET_PRODUCT ({}) does not match attached device ({})" msg = "You used the wrong lunch: TARGET_PRODUCT ({}) does not match attached device ({})"
sys.exit(msg.format(target_device, ", ".join(n if n else "None" for n in names))) sys.exit(msg.format(target_device, ", ".join(n if n else "None" for n in names)))