mumu自动获取adb多开编号大于32时修复
All checks were successful
ci/woodpecker/push/check_format Pipeline was successful

This commit is contained in:
Elaina 2024-12-05 17:19:04 +08:00
parent 8628c211d1
commit 5b462a32ec

View file

@ -80,7 +80,9 @@ def get_adb_serial() -> str:
except ValueError:
return
if config.conf.emulator.name == "MuMu12":
port = str(16384 + index * 32)
base_port = 16384
cycle_offset = (index // 32) * 4 # 每 32 个编号端口回滚,增加 4
port = str(base_port + (index % 32) * 32 + cycle_offset)
elif config.conf.emulator.name == "雷电9":
port = str(5555 + index * 2)
elif config.conf.emulator.name == "夜神":