| name | harmony-emulator-manage |
| description | Verifies or starts a HarmonyOS simulator or USB device via hdc, without running UI tests. Use after no-device unit tests in an autofix loop, or when hdc list targets is empty before on-device steps. |
harmony-emulator-manage
Scope: Connectivity only—no hvigorw test execution and no full UI test suite.
Before running
- Read
.cursor/ohos-dev-commands.md section Emulator / device.
- Apply
safe-command-policy.
Flow
hdc list targets.
- If a valid target exists, apply the manifest skip rule: verify stability (optionally a trivial
hdc shell ping if the team uses it).
- If empty: follow manifest (fill) for starting the emulator, then wait and re-check
hdc list targets up to a reasonable timeout.
On failure
test-failure-classifier: usually env-infra, tier human_required if the simulator cannot be started non-interactively.
- Do not “fix” code; stop and list device/emulator checklist for the user.
On success
Proceed to harmony-ui-test.