's'
This commit is contained in:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user