diff --git a/README.md b/README.md index 6b839cb..d3e2e87 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,12 @@ 被控端: Android 手机/Android 模拟器以及其他支持 Adb(安卓调试桥) 的 Android 平台 > 不保证较低版本平台兼容性, 具体兼容性有待测试 +### 推荐配置 +蓝叠5国际版 64bit或蓝叠 Pie 64bit,分辨率`1280*720`(DPI: 240)或`1920*1080`(DPI: 240),界面缩放`100%`,经测试可以顺利运行。 +其他模拟器与配置不保证可正常运行,如果有问题请在[discussion | 模拟器识图问题收集区](https://github.com/ACGN-Alliance/BlueArchive-Starter-cli/issues/13)反馈,如果可以的话之后会进行适配,谢谢~ + ## 下载 -最新版本: [v1.0.3](https://github.com/ACGN-Alliance/BlueArchive-Starter-cli/releases/tag/v1.0.3) +[Release](https://github.com/ACGN-Alliance/BlueArchive-Starter-cli/releases) > 因为Windows下使用`--onefile`打包有概率报毒,因此将dll与pyd文件拆开了 diff --git a/main.py b/main.py index 628a00d..b6066e8 100644 --- a/main.py +++ b/main.py @@ -13,7 +13,7 @@ from script import script from utils import adb -__version__ = "1.0.3" +__version__ = "1.0.5" device_now = "" adb_con: Optional[adb.ADB] = None # adb类变量 @@ -91,6 +91,7 @@ def notice(): - 游戏宽高比设置为`16:9` - 如果加入了社团请先退出, 否则会导致操作失败 - 扫描并连接实体机时, 请留意手机上的rsa确认对话框并点击确认 +- 用户名不能使用非法字符,中文因为adb的限制也不能使用 """ print(notice) input("按任意键以继续...") @@ -98,15 +99,17 @@ def notice(): def on_device_selected(): global adb_con, all_device_lst, device_now, port + + pname = "" if "emulator" in device_now: port = int(device_now.split("-")[1]) + 1 elif "127.0.0.1" in device_now or "localhost" in device_now: port = int(device_now.split(":")[1]) else: - # is_physic = True + pname = device_now port = 5555 - adb_con = adb.ADB(device_name=f"localhost:{port}") + adb_con = adb.ADB(device_name=f"localhost:{port}", physic_device_name=pname) print(f"已选择设备: {device_now}") @exception_handle diff --git a/utils/adb.py b/utils/adb.py index 90842c7..ccdb1f7 100644 --- a/utils/adb.py +++ b/utils/adb.py @@ -22,7 +22,7 @@ def __init__( device_name: str = "", delay: int | float = 1, scan_mode: bool = False, - is_physic_device: bool = False + physic_device_name: str = "" ): """ 初始化针对特定Android设备的ADB接口。 @@ -39,12 +39,14 @@ def __init__( else: self.adb_path = "./platform-tools/adb" - if not is_physic_device: + if not physic_device_name: subprocess.run( [self.adb_path, "connect", device_name], stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) + else: + self.device_name = physic_device_name if not scan_mode: self.screen_width, self.screen_height = self._get_screen_resolution()