Skip to content

Conversation

@Nanboom233
Copy link
Contributor

No description provided.

Nanboom233 and others added 30 commits September 4, 2025 01:19
…ager.

BREAKING CHANGE: WSA is no longer supported.
Relocates the U2Screenshot class from its dedicated file to the
core/device/uiautomator2/uiautomator2.py module.

This improves module cohesion by consolidating all uiautomator2-related
functionality, including its client and screenshot capabilities, into
a single, logical location. It enhances code organization and makes
the structure more intuitive.
Relocates the U2Screenshot class from its dedicated file to the
core/device/uiautomator2/uiautomator2.py module.

This improves module cohesion by consolidating all uiautomator2-related
functionality, including its client and screenshot capabilities, into
a single, logical location. It enhances code organization and makes
the structure more intuitive.
…e-refactor)

Consolidates device interaction logic into unified client classes,
improving code organization and reducing redundancy. This change
merges separate control and screenshot components for ADB and
Scrcpy into single, cohesive client interfaces.

Key changes:
- AdbClient now handles both control and screenshot functionalities.
- ScrcpyClient integrates control and screenshot logic, replacing
  the separate ScrcpyControl and ScrcpyScreenshot classes.
- Removed the redundant U2Screenshot class.
- Updated core/device/Control.py and core/device/Screenshot.py
  to utilize the new consolidated client architecture.
- Renamed core/device/screenshot/mss.py to core/device/windows/mss.py.
…factor)

The device interaction logic has been refactored to merge
screenshot and control functionalities into a single class.

- `core/device/Control.py` has been deleted.
- `core/device/Screenshot.py` has been renamed to
  `core/device/Device.py` and now encapsulates all methods
  for both capturing screenshots and performing control actions
  (click, swipe, scroll, etc.).
- The `Baas_thread` now instantiates a single `Device` object,
  simplifying its interaction with the underlying device.
  This improves code organization and reduces complexity by
  providing a unified interface for device operations.
uiautomator2==3.4.0 depends on adbutils>=2.9.3,<2.10.0, so it requires a dependency version bump
…pr-device-refactor)

Consolidate NemuControl and NemuScreenshot into a unified NemuClient.
This moves all MuMu Player 12 interaction logic to core/device/nemu/nemu.py,
reducing code duplication and improving maintainability. The NemuClient
now handles both control and screenshot operations, including enhanced
auto-detection of the emulator path.

Similarly, PyautoguiControl and PyautoguiScreenshot are merged into a
single PyautoguiClient in core/device/windows/pyautogui.py.

These changes simplify the Device class's initialization logic by using
a single client instance for both control and screenshot methods,
leading to a cleaner and more consistent architecture.
…-minicap)

This commit introduces support for minicap as a new screenshot method.
Minicap is a fast and efficient tool for capturing display frames
from Android devices, which can significantly improve the performance
and reliability of image acquisition for the automation script.

Changes include:
- New `MinicapClient` in `core/device/openstf/minicap.py` handles
  minicap installation, process management, and frame capturing.
- `default_config.py` updated to list "minicap" as an available
  screenshot method.
- `core/device/screenshot.py` integrates `MinicapClient` for use.
The `get_screen_size` method now returns dimensions as `(height, width)`
instead of `(width, height)`.

This change aligns the function's output with the expected format for
downstream consumers, preventing potential misinterpretations or
layout issues where height and width might be swapped.
While `adb shell wm size` typically reports `WIDTHxHEIGHT`, the
application's internal logic expects `HEIGHTxWIDTH` from this method.
Ensuring the minicap process remains active and stable. This prevents
premature termination due to garbage collection of the connection.
… instead of depending on ui2

Moves app lifecycle management (start, stop, get current app)
from direct u2 calls to the `connection` object. This change
encapsulates device interaction logic within the `connection`
module.
… instead of depending on ui2

Moves app lifecycle management (start, stop, get current app)
from direct u2 calls to the `connection` object. This change
encapsulates device interaction logic within the `connection`
module.
# Conflicts:
#	core/device/connection.py
@Nanboom233 Nanboom233 marked this pull request as draft September 8, 2025 22:23
@Nanboom233 Nanboom233 closed this Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant