Skip to content

Commit 327eb2f

Browse files
committed
Fix: [ALAS] BlueStacks Air serial auto increase from 127.0.0.1:5555 + 10*n
1 parent 6dd2b52 commit 327eb2f

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

module/device/connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ def is_bluestacks_air(self):
318318
# BlueStacks Air is the Mac version of BlueStacks
319319
if not IS_MACINTOSH:
320320
return False
321-
if not self.is_ldplayer_bluestacks_family:
321+
# 127.0.0.1:5555 + 10*n, assume 32 instances at max
322+
if not (5555 <= self.port <= 5875):
322323
return False
323324
# [bst.installed_images]: [Tiramisu64]
324325
# [bst.instance]: [Tiramisu64]

module/device/connection_attr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def port(self) -> int:
165165

166166
@cached_property
167167
def is_mumu12_family(self):
168-
# 127.0.0.1:16XXX
168+
# 127.0.0.1:16384 + 32*n, assume 32 instances at max
169169
return 16384 <= self.port <= 17408
170170

171171
@cached_property
@@ -177,7 +177,8 @@ def is_mumu_family(self):
177177
@cached_property
178178
def is_ldplayer_bluestacks_family(self):
179179
# Note that LDPlayer and BlueStacks have the same serial range
180-
return self.serial.startswith('emulator-') or 5555 <= self.port <= 5587
180+
# 127.0.0.1:5555 + 2*n, assume 32 instances at max
181+
return self.serial.startswith('emulator-') or 5555 <= self.port <= 5619
181182

182183
@cached_property
183184
def is_nox_family(self):

0 commit comments

Comments
 (0)