How cndaqiang/autowzry works
Project type and purpose
• From the README and project metadata, this is an open-source automation tool (“自动化农活演示”) built in Python on top of the Airtest framework.
• It orchestrates an Android emulator running the mobile game (Honor of Kings), performs image-recognition, simulates touch events, auto-updates the game, runs battles, and collects in-game rewards in a 24×7 unattended fashion.
(minimal) file structure and inferred modules
• Although the provided tree only shows .github, LICENSE, README, the README refers to multiple logical modules:
• Emulator launcher & manager
• Game update downloader
• Image‐recognition engine
• Touch‐input simulator
• Workflow/orchestrator (battle logic, gift-claim logic)
• Logging & monitoring
• Configuration & scheduling
README for architecture clues
• Built on top of airtest-mobileauto
• Works via “图像识别” (screenshots) + “模拟点击” (simulated taps)
• Modules: 启动模拟器, 更新游戏, 自动对战, 礼包领取
• 7×24h 无人值守自动化架构
Main components & relationships
a. Components
1) Orchestrator / Scheduler
2) Emulator Controller (Nox, MEmu, etc.)
3) Screen Capture & Image Recognition Engine
4) Input Simulator (tap/swipe)
5) Update Manager (downloads game patches)
6) Module Library (battle logic, gift-claim flows)
7) Config & CLI/GUI Interface
8) Logger / Metrics / Storage
9) External Dependencies (Airtest library, Android emulator, game servers)
b. Interactions
• Scheduler triggers Orchestrator at configured intervals
• Orchestrator calls Emulator Controller to start/stop emulator
• Emulator streams screen frames → Image Recognition extracts UI state
• Orchestrator picks next step (e.g., “start battle” or “claim gift”) from Module Library
• Input Simulator injects taps into emulator
• Update Manager periodically fetches patches via network → applies via Emulator Controller
• All actions and errors logged to Logger/Storage
c. Architectural patterns/design principles
• Modular “plugin”-style modules for each game action (battle, gift)
• Separation of concerns: capture → analysis → command → logging
• Scheduler + event loop for 24×7 unattended operation
• External dependencies isolated behind controller/adapter interfaces
d. Key technologies/frameworks
• Python + airtest-mobileauto
• Android emulator (e.g., NoxPlayer, MEmu)
• OpenCV or Airtest’s image-matching engine
• Standard logging, file I/O, HTTP for updates