This commit is contained in:
eric
2026-04-04 15:42:13 -05:00
parent 898238b3e0
commit 0e11bd85ff
4 changed files with 15 additions and 3 deletions

View File

@@ -258,6 +258,11 @@ def main():
default=[],
help="Additional redroid property, repeatable",
)
parser.add_argument(
"--adb-insecure",
action="store_true",
help="Set ro.adb.secure=0 so adb over TCP does not stay 'unauthorized' (no UI to approve keys)",
)
args = parser.parse_args()
image = args.image
@@ -296,6 +301,8 @@ def main():
cmd.extend(preset_props(preset))
cmd.extend(device_profile_props(device_profile))
cmd.extend(args.extra_prop)
if args.adb_insecure:
cmd.append("ro.adb.secure=0")
if args.replace and not args.dry_run:
subprocess.run(
@@ -318,6 +325,11 @@ def main():
subprocess.run(cmd, check=True)
print_color("Container started as {}".format(name), bcolors.GREEN)
print("ADB: adb connect 127.0.0.1:{}".format(args.port))
if not args.adb_insecure:
print(
"If the device shows as unauthorized, stop the container and re-run with --adb-insecure "
"(headless instances cannot tap the USB debugging authorization dialog)."
)
if __name__ == "__main__":