's'
This commit is contained in:
@@ -261,7 +261,10 @@ def main():
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--adb-insecure",
|
"--adb-insecure",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Set ro.adb.secure=0 so adb over TCP does not stay 'unauthorized' (no UI to approve keys)",
|
help=(
|
||||||
|
"Disable ADB RSA authorization (ro.adb.secure=0 + androidboot.adb.secure=0). "
|
||||||
|
"Passed early so init applies it before other ro.* props (see redroid-doc #579)."
|
||||||
|
),
|
||||||
)
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@@ -291,18 +294,21 @@ def main():
|
|||||||
cmd.extend(["--memory", memory])
|
cmd.extend(["--memory", memory])
|
||||||
if not args.keep_container:
|
if not args.keep_container:
|
||||||
cmd.append("--rm")
|
cmd.append("--rm")
|
||||||
cmd.extend(
|
cmd.append(image)
|
||||||
[
|
# Init applies read-only props in order; later ro.adb.secure=0 is ignored if adb.secure
|
||||||
image,
|
# was already set (redroid-doc #579). Put these immediately after the image name.
|
||||||
"androidboot.redroid_gpu_mode={}".format(args.gpu_mode),
|
if args.adb_insecure:
|
||||||
]
|
cmd.extend(
|
||||||
)
|
[
|
||||||
|
"androidboot.adb.secure=0",
|
||||||
|
"ro.adb.secure=0",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
cmd.append("androidboot.redroid_gpu_mode={}".format(args.gpu_mode))
|
||||||
cmd.extend(bridge_props(bridge))
|
cmd.extend(bridge_props(bridge))
|
||||||
cmd.extend(preset_props(preset))
|
cmd.extend(preset_props(preset))
|
||||||
cmd.extend(device_profile_props(device_profile))
|
cmd.extend(device_profile_props(device_profile))
|
||||||
cmd.extend(args.extra_prop)
|
cmd.extend(args.extra_prop)
|
||||||
if args.adb_insecure:
|
|
||||||
cmd.append("ro.adb.secure=0")
|
|
||||||
|
|
||||||
if args.replace and not args.dry_run:
|
if args.replace and not args.dry_run:
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
@@ -330,6 +336,12 @@ def main():
|
|||||||
"If the device shows as unauthorized, stop the container and re-run with --adb-insecure "
|
"If the device shows as unauthorized, stop the container and re-run with --adb-insecure "
|
||||||
"(headless instances cannot tap the USB debugging authorization dialog)."
|
"(headless instances cannot tap the USB debugging authorization dialog)."
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
print(
|
||||||
|
"If adb still shows unauthorized: stop the container, delete host folder "
|
||||||
|
"{}/misc/adb (persisted keys from an older boot), then start again. "
|
||||||
|
"Also try: adb kill-server && adb start-server".format(data_dir)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user