diff --git a/module/device/connection.py b/module/device/connection.py index 2d29d0ab9..2bc838e70 100644 --- a/module/device/connection.py +++ b/module/device/connection.py @@ -273,15 +273,20 @@ class Connection(ConnectionAttr): return True return False + @cached_property + def nemud_app_keep_alive(self) -> str: + res = self.adb_getprop('nemud.app_keep_alive') + return res + @retry def check_mumu_app_keep_alive(self): if not self.is_mumu_family: return False - res = self.adb_getprop('nemud.app_keep_alive') + res = self.nemud_app_keep_alive logger.attr('nemud.app_keep_alive', res) if res == '': - # Empry property, might not be a mumu emulator or might be an old mumu + # Empty property, probably MuMu6 or MuMu12 version < 3.5.6 return True elif res == 'false': # Disabled diff --git a/module/device/connection_attr.py b/module/device/connection_attr.py index cfa78a927..622020960 100644 --- a/module/device/connection_attr.py +++ b/module/device/connection_attr.py @@ -127,7 +127,12 @@ class ConnectionAttr: def is_mumu_family(self): # 127.0.0.1:7555 # 127.0.0.1:16384 + 32*n - return self.serial == '127.0.0.1:7555' or self.serial.startswith('127.0.0.1:16') + return self.serial == '127.0.0.1:7555' or self.is_mumu12_family + + @cached_property + def is_mumu12_family(self): + # 127.0.0.1:16384 + 32*n + return len(self.serial) == 15 and self.serial.startswith('127.0.0.1:16') @cached_property def is_emulator(self):