MCPcopy Create free account
hub / github.com/zai-org/Open-AutoGLM / module

Method module

phone_agent/device_factory.py:33–46  ·  view source on GitHub ↗

Get the appropriate device module (adb or hdc).

(self)

Source from the content-addressed store, hash-verified

31
32 @property
33 def module(self):
34 """Get the appropriate device module (adb or hdc)."""
35 if self._module is None:
36 if self.device_type == DeviceType.ADB:
37 from phone_agent import adb
38
39 self._module = adb
40 elif self.device_type == DeviceType.HDC:
41 from phone_agent import hdc
42
43 self._module = hdc
44 else:
45 raise ValueError(f"Unknown device type: {self.device_type}")
46 return self._module
47
48 def get_screenshot(self, device_id: str | None = None, timeout: int = 10):
49 """Get screenshot from device."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected