From fc676746cf2562c1f513f83539d72470a72ee836 Mon Sep 17 00:00:00 2001 From: lichx Date: Tue, 14 Jan 2025 23:53:25 +0800 Subject: [PATCH] =?UTF-8?q?[fixbug]=20=E6=9B=B4=E6=96=B0adb=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ArknightsMaaConfig/maa.py | 5 +++-- ArknightsMaaConfig/profiles/default.json | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ArknightsMaaConfig/maa.py b/ArknightsMaaConfig/maa.py index 6f1b789..4ff9cf3 100755 --- a/ArknightsMaaConfig/maa.py +++ b/ArknightsMaaConfig/maa.py @@ -74,11 +74,12 @@ cp.Command("maa self update") # fire it up cp.Command("docker stop redroid") redroid_path = os.getenv('redroid_path', "/home/lichx/.config/redroid-rk3588/") +adb_address = os.getenv('adb_address', "localhost:5555") os.chdir(redroid_path) cp.Command("docker compose up -d") time.sleep(15) -cp.RetryCommand("adb connect localhost:5555") -cp.RetryCommand("adb -s localhost:5555 shell am start --windowingMode 4 com.hypergryph.arknights/com.u8.sdk.U8UnityContext") +cp.RetryCommand(f"adb connect {adb_address}") +cp.RetryCommand(f"adb -s {adb_address} shell am start --windowingMode 4 com.hypergryph.arknights/com.u8.sdk.U8UnityContext") # run maa haveError |= TaskFailRetry("maa run startup") != 0 haveError |= TaskFailRetry("maa run recruit") != 0 diff --git a/ArknightsMaaConfig/profiles/default.json b/ArknightsMaaConfig/profiles/default.json index ad66c1c..5e30eb8 100644 --- a/ArknightsMaaConfig/profiles/default.json +++ b/ArknightsMaaConfig/profiles/default.json @@ -1,5 +1,6 @@ { "connection": { + "address": "172.17.0.1:5555", "preset": "ADB" }, "instance_options": {