feat: add HarmonyOS support - #1683
Conversation
|
Real-device validation recordings:
agent-device-harmonyos-uat-720p.mp4
agent-device-harmonyos-emulator-uat-720p.mp4Both recordings use the fixture application and the PR branch shown above. |
|
Reviewed exact head |
8a98bec to
282241e
Compare
|
@thymikee Thanks — addressing your review at #1683 (comment). All three items are resolved in final head
Validation: |
282241e to
739773c
Compare
|
Re-reviewed |
|
@thymikee Replying to #1683 (comment) with exact-head DevEco emulator evidence.
|
|
P1: the exact-head evidence closes filter correctness but demonstrates the implementation is not bounded enough to ship. Default HarmonyOS |
|
@thymikee Addressed the P1 from #1683 (comment) in exact head The default HarmonyOS inventory now has one 60 s aggregate deadline covering Regression coverage uses a six-bundle controlled stall: it proves only four metadata requests launch, then verifies the first classification failure aborts all three in-flight siblings and starts none of the remaining two queued bundles. Exact-head emulator evidence ( The default result does not include Follow-up research after comparing the Android
Therefore there is no public HarmonyOS equivalent to Android |
|
Re-reviewed
The exact-head emulator evidence credibly retains filtering and improves default inventory time to 4.31 s, but it does not cover these error/boundary paths. |
Add HDC-backed discovery, snapshots, application lifecycle, and core mobile interactions. Route HarmonyOS through the platform registry and client contracts. Cover parsing and capability parity with focused tests.
Install and reinstall signed HAP archives through HDC. Resolve bundle identities from module metadata and relaunch after package replacement. Extend deploy routing and capability coverage for HarmonyOS.
Execute pan, fling, and swipe plans through HDC uiInput primitives. Derive scroll coordinates from the live ArkUI viewport. Keep unsupported multi-touch gestures explicitly rejected.
Separate session, device, capability, and app inventory response paths. Preserve the public inventory response contract while reducing handler complexity.
Route HarmonyOS enter, return, and dismiss through HDC key events. Expose supported keyboard actions through the system command metadata. Keep keyboard visibility inspection explicitly unsupported.
Keep drag unavailable until HDC can preserve source and destination hold semantics.
1. Stream HarmonyOS app logs through PID-scoped hilog sessions.\n2. Record HarmonyOS app identity during bundle-id opens for app-scoped commands.\n3. Cover backend routing and bundle identity resolution.
1. Read the foreground HarmonyOS mission through aa dump.\n2. Expose HarmonyOS appstate with package and ability metadata.\n3. Add parser coverage for foreground and missing-state cases.
1. Classify appstate in the command descriptor capability matrix.\n2. Surface supported appstate commands in capability inventory.\n3. Cover the advertised Android capability contract.
1. Sample HarmonyOS process CPU and resident memory through HDC.\n2. Expose the verified metrics through the shared perf command.\n3. Keep frame and memory snapshot collection explicitly unavailable.
1. Add HarmonyOS settings clear-app-state through bundle cleanup.\n2. Force stop the app before clearing data and cache.\n3. Reject all unverified HarmonyOS settings explicitly.
1. Describe HarmonyOS HDC prerequisites and HAP installation.\n2. Add HarmonyOS to platform discovery and product documentation.\n3. Document verified performance limits for the public HDC surface.
1. Bind a resolved HarmonyOS bundle after install or reinstall.\n2. Keep app-scoped logs and observability available after deployment.\n3. Cover session identity preservation for HarmonyOS reinstall.
1. Add an independent HarmonyOS capability-matrix oracle and exact advertised-command regression test. 2. Document current HDC-backed support and evidence-based unsupported command boundaries.
1. Split device selection and settings dispatch into focused helpers without changing behavior. 2. Keep HarmonyOS serial selection and lock-policy classification covered by regression tests. 3. Remove Fallow complexity findings from the HarmonyOS diff against upstream main.
1. Apply a 15 second timeout to ordinary HDC operations. 2. Preserve operation-specific timeout budgets for installation and capture paths. 3. Add regression coverage for default and overridden HDC timeouts.
Implement physical-device whole-screen recording through the system recorder and HDC media transfer. Reject unsupported HarmonyOS recording scopes and export flags. Cover capability routing, media retrieval, cleanup, and simulator rejection.
Add an HDC version check to the HarmonyOS doctor flow. Document HarmonyOS as a supported doctor platform and cover the result.
Reduce recording validation and test complexity without changing behavior.
Synchronize public platform expectations across CLI, MCP, replay, and inventory tests. Mock HarmonyOS inventory probes to preserve concurrent test behavior.
Require a physical HarmonyOS device in the independent capability parity oracle.
Exercise HDC input, lifecycle, installation, and relaunch command sequences.
Exercise discovery, screenshot validation, and process performance sampling.
Keep HDC hardware validation local and require mocked CI contract tests.
1. 限制应用元数据分类并发并为默认清单设置整体时限. 2. 将请求取消信号传递给 HarmonyOS 应用清单读取. 3. 补充失败时中止在飞读取且不继续排队的回归测试.
1. 保留触发应用元数据分类失败的原始错误, 避免被取消同级任务覆盖. 2. 补充总时限中止在飞读取且不启动排队任务的回归测试. 3. 验证后序任务失败时保留默认筛选的恢复提示.
e800c15 to
46a2353
Compare
|
@thymikee Addressed both P2s from #1683 (comment) in rebased head
Validation: focused HarmonyOS lifecycle and inventory-route tests pass, the previously failing |
|
Re-reviewed exact head The branch is rebased on current |
thymikee
left a comment
There was a problem hiding this comment.
Let's give it a shot! Sorry for lagging for so long. @vwww-droid can I count on you for fixing bugs and implement new features for that platform?
|
@thymikee Absolutely — I would be very happy to continue maintaining and improving the HarmonyOS support: fixing bugs, implementing new platform features, and keeping physical-device and emulator verification healthy as the ecosystem evolves. Please feel free to reach me here on GitHub or by email at vwvw2025@outlook.com. Thanks for the trust! |
|
Thanks! I work on platform-daemon decoupling now at #1696 so maintaining platform details should get easier soon |
Summary
Adds HDC-backed HarmonyOS support to agent-device for both physical devices and DevEco emulators.
This supersedes #679. It is rebased on current
main, uses the current platform-plugin and typed-node architecture, and intentionally does not claim the unsupported alert, notification push, or orientation-control behaviors from that earlier implementation.Validation
pnpm check:affected --runLimitations
Scope: 151 files changed relative to current
main.