|
| 1 | +# HarmonyOS uninstall route with post-uninstall verification, 2026-11-12 |
| 2 | + |
| 3 | +Evidence for #4292: the public `uninstall` command runs the fixed route end to |
| 4 | +end on hardware. The fix at 31dfcd012 keys removal success on a second |
| 5 | +`bm dump` that no longer finds the bundle record, not on the `bm uninstall` |
| 6 | +answer, because `bm` prints its verdict into stdout at host exit code 0 on |
| 7 | +this build (see `harmonyos-uninstall-2026-11-08.md` for the recorded shapes). |
| 8 | + |
| 9 | +## Device and build |
| 10 | + |
| 11 | +- HUAWEI 畅享 90 Plus, model `JDY-AL50`, HarmonyOS 7.0.0.111 (SP10C00E111R4P3), API 26 |
| 12 | +- Physical device over USB, `hdc shell` as uid 2000 (shell) |
| 13 | +- agent-device head `31dfcd012`, built in the contribution worktree, daemon restarted clean |
| 14 | +- Target bundle: `com.stringzhao.adtrajdriver`, the debug-signed harness HAP |
| 15 | + from this contribution's own tooling (`examples/harmony-trajectory-driver`); |
| 16 | + no user data involved. |
| 17 | + |
| 18 | +## The route under test |
| 19 | + |
| 20 | +```sh |
| 21 | +agent-device install <entry-debug-signed.hap> --platform harmonyos --serial 77TYD26826028730 --json |
| 22 | +agent-device uninstall com.stringzhao.adtrajdriver --platform harmonyos --serial 77TYD26826028730 --json |
| 23 | +agent-device uninstall com.stringzhao.adtrajdriver --platform harmonyos --serial 77TYD26826028730 --json |
| 24 | +``` |
| 25 | + |
| 26 | +## Observed output (verbatim) |
| 27 | + |
| 28 | +Install admits the bundle: |
| 29 | + |
| 30 | +```json |
| 31 | +{ |
| 32 | + "success": true, |
| 33 | + "data": { |
| 34 | + "app": "com.stringzhao.adtrajdriver", |
| 35 | + "appId": "com.stringzhao.adtrajdriver", |
| 36 | + "package": "com.stringzhao.adtrajdriver", |
| 37 | + "message": "Installed: com.stringzhao.adtrajdriver" |
| 38 | + } |
| 39 | +} |
| 40 | +``` |
| 41 | + |
| 42 | +Uninstall reports removal, and a host-side `bm dump -n` right after answers |
| 43 | +`error: failed to get information and the parameters may be wrong.` — the |
| 44 | +record is gone, so the second dump the fix adds agreed with the hardware: |
| 45 | + |
| 46 | +```json |
| 47 | +{ |
| 48 | + "success": true, |
| 49 | + "data": { |
| 50 | + "platform": "harmonyos", |
| 51 | + "app": "com.stringzhao.adtrajdriver", |
| 52 | + "wasInstalled": true, |
| 53 | + "appId": "com.stringzhao.adtrajdriver", |
| 54 | + "message": "Uninstalled: com.stringzhao.adtrajdriver" |
| 55 | + } |
| 56 | +} |
| 57 | +``` |
| 58 | + |
| 59 | +A second uninstall answers honestly that nothing was removed: |
| 60 | + |
| 61 | +```json |
| 62 | +{ |
| 63 | + "success": true, |
| 64 | + "data": { |
| 65 | + "platform": "harmonyos", |
| 66 | + "app": "com.stringzhao.adtrajdriver", |
| 67 | + "wasInstalled": false, |
| 68 | + "message": "Not installed: com.stringzhao.adtrajdriver" |
| 69 | + } |
| 70 | +} |
| 71 | +``` |
| 72 | + |
| 73 | +## What is proven here and what is not |
| 74 | + |
| 75 | +- The public `uninstall` route, the deployment-runtime admission for a physical |
| 76 | + `device` denominator, and the post-uninstall dump verification all ran on |
| 77 | + hardware at a named commit. |
| 78 | +- The `wasInstalled: false` branch ran against a genuinely absent record with |
| 79 | + the live-transport probe answering. |
| 80 | +- The "record survives bm uninstall" refusal (a `bm` that answers success but |
| 81 | + leaves the bundle) has no hardware reproduction on this build; the unit test |
| 82 | + `uninstall refuses to claim removal when the bundle record survives bm |
| 83 | + uninstall` pins the behavior with the recorded output shapes. |
| 84 | +- Local `check:affected --run --head 31dfcd012 --base old-origin/main` passes |
| 85 | + every stage except `unit`; `unit` fails only |
| 86 | + `scripts/__tests__/eager-closure-budgets.test.ts` because this clone's |
| 87 | + `origin` names a private fork, so the gate reads the wrong merge base. With |
| 88 | + `refs/remotes/origin/main` pointed at the upstream head for the duration of |
| 89 | + one `pnpm run check:unit`, that chain exits 0. Both receipts are local; CI on |
| 90 | + the pushed head is the authoritative run. |
0 commit comments