dsh-apk-vm 0.0.0-stage → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +383 -0
- package/CODE_OF_CONDUCT.md +130 -0
- package/CONTRIBUTING.md +177 -0
- package/DEMO.md +85 -0
- package/DESIGN.md +335 -0
- package/LICENSE +204 -0
- package/NOTICE +74 -0
- package/README.md +965 -2
- package/SECURITY.md +108 -0
- package/client.js +4330 -0
- package/cordis.patch.yml +56 -0
- package/docs/LINUX-E2E.md +81 -0
- package/docs/PRIVACY.md +36 -0
- package/docs/README.md +31 -0
- package/docs/RELEASING.md +104 -0
- package/docs/SUBMISSION.md +78 -0
- package/docs/screenshot-panel.png +0 -0
- package/docs/screenshot-sidebar.png +0 -0
- package/icon.svg +8 -0
- package/index.js +2768 -0
- package/lib/android.js +2666 -0
- package/lib/apk-bundle.js +165 -0
- package/lib/flows.js +198 -0
- package/lib/instances.js +559 -0
- package/lib/scrcpy.js +2370 -0
- package/lib/setup.js +1624 -0
- package/lib/ui-inspector.js +174 -0
- package/lib/vendor/scrcpy-server-v5.0.1.jar +0 -0
- package/lib/video-stream.js +329 -0
- package/lib/ws.js +198 -0
- package/lib/x509.js +107 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +84 -4
- package/scripts/privacy-scan.mjs +94 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
Substantive feature release: inspection, replay, package bundles, network debugging,
|
|
6
|
+
reproducible demo, and real Linux support.
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- **UI Inspector + selector generation.** `GET /apk-vm/debug/inspect` returns parsed
|
|
11
|
+
UIAutomator nodes with bounds, labels and copy-ready `find_ui` / `assert_text` / `tap_text`
|
|
12
|
+
commands; the panel renders a clickable overlay and the `apk_vm` tool gains `inspect_ui`.
|
|
13
|
+
- **Interaction recorder / replay.** `GET|POST /apk-vm/flows` lists, starts, stops, replays
|
|
14
|
+
and deletes JSON flows of tap/swipe/key/text input; the panel has a Flow recorder card and
|
|
15
|
+
Agents get `flow_start`, `flow_stop`, `flow_list`, `flow_replay`.
|
|
16
|
+
- **APKS / XAPK / split APK installation.** Upload and install `adb install-multiple` bundles;
|
|
17
|
+
`.aab` is rejected with a bundletool hint. The APK list tags bundle files.
|
|
18
|
+
- **Network debugging.** Set/clear the guest global HTTP proxy and install a local PEM/DER CA
|
|
19
|
+
with the correct OpenSSL subject hash via `/apk-vm/debug/proxy` and `/apk-vm/debug/ca`
|
|
20
|
+
(plus Agent tool actions `proxy` and `install_ca`).
|
|
21
|
+
- **Reproducible public demo.** `examples/` contains a committed MIT-licensed 12 KB sample
|
|
22
|
+
APK, a deterministic SDK-only build script, and `demo.mjs`, which installs it, taps the
|
|
23
|
+
button, asserts `Hello from dsh-apk-vm`, and saves a screenshot.
|
|
24
|
+
- **Real Linux support.** Headless x86_64 validation on Ubuntu 22.04 with KVM and
|
|
25
|
+
SwiftShader: boot, adb root, APK install, UIAutomator input, H.264/scrcpy, proxy, CA and
|
|
26
|
+
screenshots; documented in `docs/LINUX-E2E.md`.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- **Dangerous auto-attach stop behavior.** `AndroidVm.stop()` no longer sends
|
|
31
|
+
`adb emu kill`/`adb disconnect` to a pre-existing device that this process did not spawn;
|
|
32
|
+
it leaves such devices running and reports `stopped`. A regression test covers it.
|
|
33
|
+
- Headless Linux launches now request `-no-metrics` and fall back from host GPU to
|
|
34
|
+
`swiftshader_indirect` when no display is present.
|
|
35
|
+
- `uiDump()` now includes UIAutomator stderr in its error instead of a generic
|
|
36
|
+
"empty hierarchy".
|
|
37
|
+
- `spike/android/smoke.mjs` updated for the richer APK metadata and the current
|
|
38
|
+
package-not-found message.
|
|
39
|
+
|
|
40
|
+
## 0.3.13
|
|
41
|
+
|
|
42
|
+
Open-source package identity.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- Package name changed from `@local/dsh-apk-vm` to **`dsh-apk-vm`**, following the DSH plugin
|
|
47
|
+
naming convention (`dsh-*`). The Host export, client bundle id, Cordis patch row, smoke tests
|
|
48
|
+
and docs were updated to match.
|
|
49
|
+
- `author` is now `yuxiaole-bili <https://github.com/yuxiaole-bili/>`.
|
|
50
|
+
- Removed `private: true` and added `publishConfig` for the public npm package
|
|
51
|
+
**`dsh-apk-vm`**; the primary install command is now
|
|
52
|
+
`dsh plugin --profile web add dsh-apk-vm` (source/GitHub install remains a fallback).
|
|
53
|
+
Published: <https://www.npmjs.com/package/dsh-apk-vm> (`0.3.13`).
|
|
54
|
+
- Wrote the package/plugin descriptions (English + Chinese `meta.description`), expanded
|
|
55
|
+
keywords, and added a suggested GitHub repository description/topics list to
|
|
56
|
+
`docs/RELEASING.md`.
|
|
57
|
+
- Configured repository metadata for
|
|
58
|
+
<https://github.com/yuxiaole-bili/dsh-apk-vm>: `repository`, `homepage`, `bugs`, README
|
|
59
|
+
badges/repository link, issue-template security/repository links, and the local `origin`
|
|
60
|
+
remote.
|
|
61
|
+
- Added the community-market submission package: one-line value, copyable source install
|
|
62
|
+
command, capability category, risk/permissions/compatibility section, real screenshots
|
|
63
|
+
(main panel + right sidebar), and `docs/SUBMISSION.md` with the filled `dsh-plugin.org` issue
|
|
64
|
+
template.
|
|
65
|
+
|
|
66
|
+
## 0.3.12
|
|
67
|
+
|
|
68
|
+
Clipboard fix + open-source release preparation.
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- `SET_CLIPBOARD` returned a BigInt sequence that could not be JSON-serialized; it is now a
|
|
73
|
+
decimal string.
|
|
74
|
+
- `GET_CLIPBOARD` now sends the required single `copyKey` payload byte instead of an empty
|
|
75
|
+
message, which previously stalled the control stream and timed out.
|
|
76
|
+
- Live-verified: set `dsh-clipboard-test-42`, then read it back successfully.
|
|
77
|
+
|
|
78
|
+
### Open-source preparation
|
|
79
|
+
|
|
80
|
+
- Added `CODE_OF_CONDUCT.md`, `.editorconfig` and `docs/RELEASING.md`.
|
|
81
|
+
- Removed personal/local paths from DEMO/DESIGN/spike docs and scripts; removed the stale
|
|
82
|
+
hard-coded DSH WebSocket port fallback from `client.js`.
|
|
83
|
+
- Updated `NOTICE` (only the bundled scrcpy JAR is redistributed; test-only upstream sources are
|
|
84
|
+
not in the repo), `SECURITY.md` supported versions and loopback threat model.
|
|
85
|
+
- Package metadata: author; contributor/security/CoC/docs included in the npm pack file list.
|
|
86
|
+
- README: open-source distribution note, CoC/release links, lifecycle test in the contributor
|
|
87
|
+
quick reference.
|
|
88
|
+
- Added `docs/PRIVACY.md` and `scripts/privacy-scan.mjs`; CI scans the tracked tree for personal
|
|
89
|
+
paths, private IPs, agent instance IDs, credential patterns and emails. The clean single-commit
|
|
90
|
+
`open-source` branch is the recommended public history; the local dev history contains older
|
|
91
|
+
workspace paths.
|
|
92
|
+
|
|
93
|
+
## 0.3.11
|
|
94
|
+
|
|
95
|
+
Clipboard sync over scrcpy control.
|
|
96
|
+
|
|
97
|
+
### Added
|
|
98
|
+
|
|
99
|
+
- `buildSetClipboardMessage()` (u8 type=9, u64 sequence, u8 paste, i32 length, UTF-8) and
|
|
100
|
+
`ScrcpySession.setClipboard()` / `requestClipboard()` (`GET_CLIPBOARD`, awaited device reply).
|
|
101
|
+
- `GET/POST /apk-vm/clipboard` plus per-instance `/apk-vm/instances/<id>/clipboard`.
|
|
102
|
+
- Panel debug card: **Copy field to device** / **Get device clipboard** buttons (the latter also
|
|
103
|
+
writes to the host clipboard when permitted).
|
|
104
|
+
- `apk_vm` actions `clipboard_set` / `clipboard_get`.
|
|
105
|
+
|
|
106
|
+
## 0.3.10
|
|
107
|
+
|
|
108
|
+
Two-finger pinch/zoom over the scrcpy control socket.
|
|
109
|
+
|
|
110
|
+
### Added
|
|
111
|
+
|
|
112
|
+
- `POST /apk-vm/touch` (and per-instance `/apk-vm/instances/<id>/touch`) forwards multi-pointer
|
|
113
|
+
touch down/move/up/cancel to the active scrcpy session. Coordinates are video-frame pixels.
|
|
114
|
+
- The screen promotes a two-finger gesture from the adb single-pointer path to a scrcpy
|
|
115
|
+
multi-touch pinch, with pointer capture and 60 Hz move throttling.
|
|
116
|
+
- `ScrcpyStream.sendTouch()` / `ExtraVmInstance.sendTouch()` for per-instance control.
|
|
117
|
+
|
|
118
|
+
## 0.3.9
|
|
119
|
+
|
|
120
|
+
Agent UI automation.
|
|
121
|
+
|
|
122
|
+
### Added
|
|
123
|
+
|
|
124
|
+
- `apk_vm` actions `find_ui` / `assert_text` / `tap_text`: dump UIAutomator XML, filter nodes by
|
|
125
|
+
text / resource-id / content-desc / class, return matching bounds/centers, assert presence, or
|
|
126
|
+
tap the matching node's center. `assert_text` returns `ok:false` on a missing node instead of
|
|
127
|
+
throwing, so Agents can branch on assertions.
|
|
128
|
+
|
|
129
|
+
### Verified
|
|
130
|
+
|
|
131
|
+
- Live multi-instance VM: `find_ui {"text":"Phone"}` → `Phone @ 102,1121`;
|
|
132
|
+
`assert_text` found 1 node; `tap_text` opened Phone; `key HOME` returned to the launcher.
|
|
133
|
+
|
|
134
|
+
## 0.3.8
|
|
135
|
+
|
|
136
|
+
Bootstrap a completely empty Android SDK.
|
|
137
|
+
|
|
138
|
+
### Added
|
|
139
|
+
|
|
140
|
+
- `bootstrapSdk()`: downloads the official command-line tools ZIP for Windows/macOS/Linux,
|
|
141
|
+
extracts it into `<sdkRoot>/cmdline-tools/latest`, runs `sdkmanager --licenses`, then installs
|
|
142
|
+
platform-tools/emulator/build-tools/platform. HTTPS only, 512 MiB cap, temp archive cleanup,
|
|
143
|
+
JDK pre-check, no shell interpolation.
|
|
144
|
+
- `POST /apk-vm/setup {"action":"bootstrap-sdk"}`, gated by `allowSetupDownloads`;
|
|
145
|
+
Environment card shows **Bootstrap SDK** when sdkmanager is missing.
|
|
146
|
+
- Setup report action list + 2 hermetic bootstrap tests (injected download/extract/exec).
|
|
147
|
+
|
|
148
|
+
### Verified
|
|
149
|
+
|
|
150
|
+
- `spike/setup-smoke.mjs`: **32/32** (bootstrap argv, extracted sdkmanager, license/install
|
|
151
|
+
calls, invalid-package rejection).
|
|
152
|
+
- Live host: setup actions include `bootstrap-sdk` (unavailable because sdkmanager exists).
|
|
153
|
+
|
|
154
|
+
## 0.3.7
|
|
155
|
+
|
|
156
|
+
Hardware keyboard forwarding in the H.264/PNG screen.
|
|
157
|
+
|
|
158
|
+
### Added
|
|
159
|
+
|
|
160
|
+
- Clicking the guest screen focuses it; common hardware keys (arrows, Enter, Escape, Tab,
|
|
161
|
+
Backspace, Delete, Home) become Android key events, and printable characters are forwarded as
|
|
162
|
+
text input. Input fields are excluded so typing in the panel is unaffected.
|
|
163
|
+
- Screen hint documents the keyboard behavior.
|
|
164
|
+
|
|
165
|
+
## 0.3.6
|
|
166
|
+
|
|
167
|
+
SDK component installation from the Environment card.
|
|
168
|
+
|
|
169
|
+
### Added
|
|
170
|
+
|
|
171
|
+
- `installSdkPackages({ packages })` in `lib/setup.js`: validated, bounded
|
|
172
|
+
`sdkmanager --install <pkg…>` with optional license stdin.
|
|
173
|
+
- `POST /apk-vm/setup {"action":"install-tools"}` installs missing
|
|
174
|
+
platform-tools/emulator/build-tools/platform (or caller-supplied `packages`), gated by
|
|
175
|
+
`allowSetupDownloads: true`.
|
|
176
|
+
- Environment card exposes the **Install SDK tools** action when adb/emulator are missing.
|
|
177
|
+
- Setup report action list and hermetic setup test updated (30/30).
|
|
178
|
+
|
|
179
|
+
## 0.3.5
|
|
180
|
+
|
|
181
|
+
Static APK preview.
|
|
182
|
+
|
|
183
|
+
### Added
|
|
184
|
+
|
|
185
|
+
- `aapt2` badging parser now returns versionName/versionCode, min/target SDK, permissions,
|
|
186
|
+
features, native ABIs and the launcher icon path in addition to package/label/activity.
|
|
187
|
+
- `GET /apk-vm/apk-info?path=…` static metadata (no VM boot).
|
|
188
|
+
- `GET /apk-vm/apk-icon?path=…` extracts a raster launcher icon directly from the APK ZIP with
|
|
189
|
+
a dependency-free ZIP reader (adaptive XML icons are reported but not rasterized).
|
|
190
|
+
- APK list shows icons for raster APKs; `apk_vm` action `apk_info`.
|
|
191
|
+
|
|
192
|
+
### Verified
|
|
193
|
+
|
|
194
|
+
- `anim60.apk`: targetSdk 34, zero permissions, activity resolved.
|
|
195
|
+
- `DSH-1.12-vc13.apk`: icon extracted as a 631-byte PNG (`89 50 4e 47` signature).
|
|
196
|
+
- `yuagent-final.apk`: versionName 0.4.4, 5 permissions, adaptive XML icon reported.
|
|
197
|
+
|
|
198
|
+
## 0.3.4
|
|
199
|
+
|
|
200
|
+
Live logcat and crash observability.
|
|
201
|
+
|
|
202
|
+
### Added
|
|
203
|
+
|
|
204
|
+
- Debug card: **Live logcat** toggle (2 s polling), **Crash log** button (`logcat -b crash`).
|
|
205
|
+
- `AndroidVm.logcat({ buffer })` supports `main|system|crash|events|all|radio|kernel`;
|
|
206
|
+
HTTP routes accept `?buffer=`, and the `apk_vm` tool accepts `buffer`.
|
|
207
|
+
- Verified `npm test` and the client smoke suite with the new debug controls.
|
|
208
|
+
|
|
209
|
+
## 0.3.3
|
|
210
|
+
|
|
211
|
+
Physical/remote adb device switching.
|
|
212
|
+
|
|
213
|
+
### Added
|
|
214
|
+
|
|
215
|
+
- `AndroidVm.listDevices()` reports emulator, USB/physical and network adb devices with
|
|
216
|
+
state/model/product/transport metadata.
|
|
217
|
+
- `GET /apk-vm/devices` and `POST /apk-vm/device` (`{"serial":…}` / `{"serial":""}`) attach an
|
|
218
|
+
online device or restore the managed AVD identity; the Environment card has a device picker
|
|
219
|
+
with Attach/Detach.
|
|
220
|
+
- `apk_vm` actions `devices`, `attach_device`, `detach_device`.
|
|
221
|
+
- Stop/dispose never sends `emu kill` or disconnects an external physical device.
|
|
222
|
+
|
|
223
|
+
### Verified
|
|
224
|
+
|
|
225
|
+
- Attached the running emulator as an external device and detached back to `dsh_apk` while
|
|
226
|
+
retaining `ready`; `/apk-vm/devices` returns serial/state/kind/model.
|
|
227
|
+
|
|
228
|
+
## 0.3.2
|
|
229
|
+
|
|
230
|
+
Artifact download for screenshots/recordings.
|
|
231
|
+
|
|
232
|
+
### Added
|
|
233
|
+
|
|
234
|
+
- `GET /apk-vm/artifacts?name=…` streams a plugin-created screenshot/recording from the OS temp
|
|
235
|
+
dir with a strict basename whitelist (no arbitrary paths).
|
|
236
|
+
- The panel's Record action now auto-downloads the MP4 after `screenrecord` completes.
|
|
237
|
+
|
|
238
|
+
## 0.3.1
|
|
239
|
+
|
|
240
|
+
Loopback-only VM API by default.
|
|
241
|
+
|
|
242
|
+
### Security
|
|
243
|
+
|
|
244
|
+
- Every `/apk-vm/*` HTTP route and the WebSocket upgrade now reject clients whose TCP peer is
|
|
245
|
+
not loopback unless `allowRemote: true` is explicitly configured. Exposing the DSH Web UI on
|
|
246
|
+
the LAN no longer automatically exposes the rooted debug API.
|
|
247
|
+
- Documented the reverse-proxy/LAN threat model and `allowRemote` opt-in.
|
|
248
|
+
|
|
249
|
+
## 0.3.0
|
|
250
|
+
|
|
251
|
+
Production lifecycle + management layer.
|
|
252
|
+
|
|
253
|
+
### Added
|
|
254
|
+
|
|
255
|
+
- **Instance lifecycle:** extra VMs expose `owner` / `lastUsedAt` / `idleMs`; an idle reaper stops
|
|
256
|
+
extras after `instanceIdleMs` (default 15 min) when no panel frames, H.264 clients or Agent
|
|
257
|
+
commands are active. AVDs are kept for quick reuse. New **VM instances** panel card with
|
|
258
|
+
owner/idle and Stop/Destroy actions.
|
|
259
|
+
- **Installed-app management:** panel card lists third-party packages for the active instance and
|
|
260
|
+
exposes force-stop / clear-data / uninstall (backed by the existing rooted debug routes).
|
|
261
|
+
- **Agent high-level input:** `apk_vm` actions `tap`, `swipe`, `long_press`, `key`, `text` with
|
|
262
|
+
device-coordinate validation and the same per-instance routing as shell/debug actions.
|
|
263
|
+
- Hermetic `spike/instances-smoke.mjs` lifecycle test + CI step.
|
|
264
|
+
|
|
265
|
+
### Verified
|
|
266
|
+
|
|
267
|
+
- `apk_vm key HOME`, `tap 360,1180`, `long_press 360,1180,600ms`, `text "dsh"` all succeeded on the
|
|
268
|
+
default VM via an isolated subagent.
|
|
269
|
+
- `/apk-vm/instances` returns owner/idle metadata; lifecycle unit test passes.
|
|
270
|
+
|
|
271
|
+
## 0.2.4
|
|
272
|
+
|
|
273
|
+
Fix H.264 input coordinate mapping.
|
|
274
|
+
|
|
275
|
+
### Fixed
|
|
276
|
+
|
|
277
|
+
- H.264 frames are downscaled (540×960) but `input tap` expects the guest display
|
|
278
|
+
coordinate space (720×1280). The client previously sent video coordinates directly, so a tap
|
|
279
|
+
at YuAgent (device ~446,1014 → video ~334,760) landed in the Phone icon. Input mapping now
|
|
280
|
+
always uses `wm size` (swapped when rotated) while video dimensions only control the canvas
|
|
281
|
+
aspect.
|
|
282
|
+
- Clicking icons in the H.264 view now hits the intended app.
|
|
283
|
+
|
|
284
|
+
## 0.2.3
|
|
285
|
+
|
|
286
|
+
Fix H.264 WebSocket target in the DSH desktop shell.
|
|
287
|
+
|
|
288
|
+
### Fixed
|
|
289
|
+
|
|
290
|
+
- The desktop shell can load the panel from a custom scheme where `location.host` is empty or
|
|
291
|
+
meaningless; the client previously fell back to a hard-coded stale localhost port, so the
|
|
292
|
+
H.264 WebSocket never connected and the panel stayed on the 1–2 fps PNG path.
|
|
293
|
+
- `/apk-vm/state` now returns the server's real origin; the client derives `ws://`/`wss://` from
|
|
294
|
+
it. WebSocket close/decoder errors are also included in the client capability report.
|
|
295
|
+
- Header continues to show the active transport (`H.264` vs `PNG`).
|
|
296
|
+
|
|
297
|
+
## 0.2.2
|
|
298
|
+
|
|
299
|
+
Stream-mode visibility / diagnostics.
|
|
300
|
+
|
|
301
|
+
### Added
|
|
302
|
+
|
|
303
|
+
- The header frame-rate badge now shows the transport: `FPS 59.0 · H.264` or `FPS 1.5 · PNG`,
|
|
304
|
+
so a low FPS is no longer ambiguous.
|
|
305
|
+
- Client capability report (`POST /apk-vm/client-report`) records the client build, WebCodecs
|
|
306
|
+
availability and `avc1` support in `/apk-vm/state.client`; the panel shows a fallback hint
|
|
307
|
+
when H.264 is unsupported in the current WebView.
|
|
308
|
+
|
|
309
|
+
## 0.2.1
|
|
310
|
+
|
|
311
|
+
Per-instance H.264 for multi-agent VMs.
|
|
312
|
+
|
|
313
|
+
### Added
|
|
314
|
+
|
|
315
|
+
- **Every extra instance now has its own H.264/WebCodecs stream** (`lib/video-stream.js`,
|
|
316
|
+
`ScrcpyStream`): independent scrcpy server, free local port, init/AVCC/keyframe handling,
|
|
317
|
+
rotation re-init and idle stop. Extra instances are created with a 720×1280 display
|
|
318
|
+
(instead of the pixel_5 1080×2340 profile) so several GPU encoders stay stable.
|
|
319
|
+
- Extra instance WebSocket endpoint: `/apk-vm/instances/<id>/ws`; panel instance selector now
|
|
320
|
+
shows H.264 canvas for extras too, with PNG fallback.
|
|
321
|
+
|
|
322
|
+
### Fixed
|
|
323
|
+
|
|
324
|
+
- Earlier 0.2.0 extra instances used PNG preview; larger AVD resolutions could stall the
|
|
325
|
+
emulator GPU when combined with a second scrcpy encoder. 720×1280 + per-instance stream is
|
|
326
|
+
stable.
|
|
327
|
+
|
|
328
|
+
### Verified
|
|
329
|
+
|
|
330
|
+
- Extra instance (emulator-5560, 720×1280): H.264 init `540×960`, **412 packets/10 s** with the
|
|
331
|
+
60Hz animation app; extra frame PNG and default VM remained responsive; destroy returns to
|
|
332
|
+
default only.
|
|
333
|
+
|
|
334
|
+
## 0.2.0
|
|
335
|
+
|
|
336
|
+
Multi-agent / multi-instance support.
|
|
337
|
+
|
|
338
|
+
### Added
|
|
339
|
+
|
|
340
|
+
- **Multiple concurrent VMs.** `InstanceManager` (`lib/instances.js`) creates isolated instances
|
|
341
|
+
with their own AVD, emulator console port, snapshot and AndroidVm state. The first Agent gets
|
|
342
|
+
the default VM; later Agents are assigned isolated instances automatically (up to
|
|
343
|
+
`maxInstances`, default 3 extra).
|
|
344
|
+
- HTTP instance API: `GET/POST /apk-vm/instances`, `DELETE /apk-vm/instances/:id`, and a
|
|
345
|
+
per-instance namespace `/apk-vm/instances/:id/{state,frame,vm,input,install,upload,debug/*}`.
|
|
346
|
+
- Panel instance selector + **New VM / Destroy VM** actions; extra instances use PNG preview
|
|
347
|
+
(H.264 remains on the default VM).
|
|
348
|
+
- `apk_vm` Agent tool: `instance` parameter, per-Agent assignment, and
|
|
349
|
+
`list_instances` / `create_instance` / `destroy_instance` / `start` / `stop` actions.
|
|
350
|
+
- `multiInstance` + `maxInstances` config; release version 0.2.0.
|
|
351
|
+
|
|
352
|
+
### Verified
|
|
353
|
+
|
|
354
|
+
- Two VMs run concurrently: default `emulator-5558` and extra `emulator-5560`
|
|
355
|
+
(`dsh_apk_test1`), both ready/root, extra frame PNG and root shell verified while default
|
|
356
|
+
remained ready. Extra instance cold boot ~27.5 s, later quick boot from its own snapshot.
|
|
357
|
+
|
|
358
|
+
## 0.1.0
|
|
359
|
+
|
|
360
|
+
First open-source release.
|
|
361
|
+
|
|
362
|
+
### Added
|
|
363
|
+
|
|
364
|
+
- Sidebar `apk-vm` entry + main panel, optional `dsh-better-sidebar` tab.
|
|
365
|
+
- AOSP Android Emulator lifecycle with quick-boot snapshot, host GPU, hypervisor detection.
|
|
366
|
+
- H.264/WebCodecs stream up to 60 fps over `/apk-vm/ws`; PNG screencap fallback.
|
|
367
|
+
- Rooted guest debug surface: auto `adb root`, on-device toolkit, `/apk-vm/debug/*` HTTP API,
|
|
368
|
+
`apk_vm` Agent tool (shell/logcat/props/packages/install/push/pull/reboot/root/rotate/
|
|
369
|
+
ui_dump/record/perf/screenshot/actions).
|
|
370
|
+
- One-glance Environment card + `/apk-vm/setup`: cross-platform SDK/adb/emulator/system image/
|
|
371
|
+
AVD/acceleration detection, AVD creation, opt-in system-image download.
|
|
372
|
+
- APK upload by button or drag-and-drop (`/apk-vm/upload`, 500 MiB limit, ZIP magic check).
|
|
373
|
+
- Multi-AVD list/switch (`/apk-vm/avds`, `/apk-vm/avd`).
|
|
374
|
+
- Same-origin guard for HTTP routes and WebSocket upgrades; bounded bodies/outputs; argv-only
|
|
375
|
+
child processes.
|
|
376
|
+
- Apache-2.0 LICENSE/NOTICE, CONTRIBUTING, SECURITY, GitHub Actions CI, issue/PR templates,
|
|
377
|
+
README/demo script.
|
|
378
|
+
|
|
379
|
+
### Known limitations
|
|
380
|
+
|
|
381
|
+
- Windows x64 is the only end-to-end verified host; macOS/Linux discovery is tested hermetically.
|
|
382
|
+
- Static screens naturally show a low FPS (encoder emits on change); audio and physical-device
|
|
383
|
+
switching are roadmap items.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official email address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported privately to the project maintainers through the repository's
|
|
63
|
+
**Security → Report a vulnerability** channel, or by contacting a maintainer
|
|
64
|
+
through the repository's listed contact channel. All complaints will be reviewed
|
|
65
|
+
and investigated promptly and fairly.
|
|
66
|
+
|
|
67
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
68
|
+
reporter of any incident.
|
|
69
|
+
|
|
70
|
+
## Enforcement Guidelines
|
|
71
|
+
|
|
72
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
73
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
74
|
+
|
|
75
|
+
### 1. Correction
|
|
76
|
+
|
|
77
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
78
|
+
unprofessional or unwelcome in the community.
|
|
79
|
+
|
|
80
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
81
|
+
clarity around the nature of the violation and an explanation of why the
|
|
82
|
+
behavior was inappropriate. A public apology may be requested.
|
|
83
|
+
|
|
84
|
+
### 2. Warning
|
|
85
|
+
|
|
86
|
+
**Community Impact**: A violation through a single incident or series of
|
|
87
|
+
actions.
|
|
88
|
+
|
|
89
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
90
|
+
interaction with the people involved, including unsolicited interaction with
|
|
91
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
92
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
93
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
94
|
+
ban.
|
|
95
|
+
|
|
96
|
+
### 3. Temporary Ban
|
|
97
|
+
|
|
98
|
+
**Community Impact**: A serious violation of community standards, including
|
|
99
|
+
sustained inappropriate behavior.
|
|
100
|
+
|
|
101
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
102
|
+
communication with the community for a specified period of time. No public or
|
|
103
|
+
private interaction with the people involved, including unsolicited interaction
|
|
104
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
105
|
+
Violating these terms may lead to a permanent ban.
|
|
106
|
+
|
|
107
|
+
### 4. Permanent Ban
|
|
108
|
+
|
|
109
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
110
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
111
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
112
|
+
|
|
113
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
114
|
+
community.
|
|
115
|
+
|
|
116
|
+
## Attribution
|
|
117
|
+
|
|
118
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
119
|
+
version 2.1, available at
|
|
120
|
+
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
|
|
121
|
+
|
|
122
|
+
Community Impact Guidelines were inspired by
|
|
123
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
124
|
+
|
|
125
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
126
|
+
https://www.contributor-covenant.org/faq. Translations are available at
|
|
127
|
+
https://www.contributor-covenant.org/translations.
|
|
128
|
+
|
|
129
|
+
[homepage]: https://www.contributor-covenant.org
|
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|