dsh-mobilecode 0.5.0 → 0.6.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/README.md +35 -2
- package/lib/client.js +1054 -999
- package/lib/device-build.js +144 -0
- package/lib/index.js +459 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -138,6 +138,34 @@ the plain JSON summary (path + UI tree + OCR) with no new error.
|
|
|
138
138
|
emulator binary, and what the plugin currently runs (preview servers, Metro,
|
|
139
139
|
builds per directory).
|
|
140
140
|
|
|
141
|
+
**Device-ultimate port (v0.6.0)** — tools ported from
|
|
142
|
+
[dsh-adb-ultimate](https://github.com/newborne/dsh-adb-ultimate), rebuilt on the
|
|
143
|
+
classified adb boundary (argv-based, quoted, replay-safe):
|
|
144
|
+
|
|
145
|
+
- `device_scroll_to` — scroll until an element (`resource_id` or `text`/
|
|
146
|
+
content-desc, exact then substring) comes into view, then report it with its
|
|
147
|
+
center tap point. Completes the control loop for long lists: `device_wait_for`
|
|
148
|
+
waits without scrolling, this brings the element on-screen so a follow-up
|
|
149
|
+
`device_tap_element` can hit it. Defaults to 8 swipes, swipe direction
|
|
150
|
+
`up`/`left`.
|
|
151
|
+
- `device_connect` — attach a Wi-Fi device: `adb connect <host>:<port>`
|
|
152
|
+
(default port 5555); pass `pairing_code` + `pairing_port` (default 37000) for
|
|
153
|
+
the first-time Android 11+ "Pair device" flow. Reattaching a known device
|
|
154
|
+
needs no code.
|
|
155
|
+
- `device_pair_qr` — the full pairing journey in one call: generates a
|
|
156
|
+
`WIFI:T:ADB;S:...;P:...;;` QR string (render it with any QR generator and scan
|
|
157
|
+
with Settings → Connected devices → Pair by QR), polls `adb mdns services`
|
|
158
|
+
(adb ≥ 31) for `_adb-tls-pairing._tcp`, then auto-pairs and connects.
|
|
159
|
+
- `device_perf` — one-shot RAM / battery / CPU snapshot (meminfo +
|
|
160
|
+
`dumpsys battery` + cpuinfo → used %, level/temp/status/health, cores).
|
|
161
|
+
- `device_app_info` — per-app detail from `dumpsys package`: versionName/
|
|
162
|
+
versionCode, minSdk/targetSdk, requested permissions, exported activities.
|
|
163
|
+
- `device_install` / `device_uninstall` — sideload a local APK
|
|
164
|
+
(`-r -g`: replace + grant runtime permissions) / remove an app (optionally
|
|
165
|
+
`-k` keep data). Uninstall is destructive.
|
|
166
|
+
- `device_reboot` — reboot into `normal` / `recovery` / `bootloader`
|
|
167
|
+
(the device drops offline and comes back in a minute or two).
|
|
168
|
+
|
|
141
169
|
**First-run experience & settings**
|
|
142
170
|
|
|
143
171
|
- On first start after installation, a **welcome window** explains how to use the
|
|
@@ -155,7 +183,11 @@ the plain JSON summary (path + UI tree + OCR) with no new error.
|
|
|
155
183
|
- **AI Prompt** — the copyable agent prompt.
|
|
156
184
|
- **Connection** — the resolved adb binary path and every device `adb` sees
|
|
157
185
|
(serial, state dot, model, USB / Wi-Fi badge), straight from
|
|
158
|
-
`GET /connection`.
|
|
186
|
+
`GET /connection`. A **connect form** (device IP + port, optional pairing
|
|
187
|
+
code + pair port → `POST /connect`) and a **Pair by QR** button
|
|
188
|
+
(`POST /pair-qr`, one blocking call that generates the `WIFI:T:ADB` QR,
|
|
189
|
+
waits for the mDNS scan and auto-pairs + connects) plus an in-line refresh.
|
|
190
|
+
Explains the Wi-Fi reconnect policy.
|
|
159
191
|
- The same settings appear as a **`MobileCode` page in the DSH Settings**
|
|
160
192
|
(registered as a `settings.section` slot, like the other installed plugins),
|
|
161
193
|
so they are reachable from Settings even when the Devices pane is closed.
|
|
@@ -167,7 +199,8 @@ the plain JSON summary (path + UI tree + OCR) with no new error.
|
|
|
167
199
|
`directory` + `platform` body, mirroring mobilecode's `server.devicePreview`
|
|
168
200
|
group — plus setup endpoints: `GET /welcome`, `POST /welcome/dismiss`,
|
|
169
201
|
`GET /doctor`, `POST /doctor/fix {id}`, `GET /ocr`, `POST /ocr/install`,
|
|
170
|
-
`GET/POST /settings`, `GET /connection
|
|
202
|
+
`GET/POST /settings`, `GET /connection` — plus the Wi-Fi actions
|
|
203
|
+
`POST /connect` (host/port/pairing code) and `POST /pair-qr` (mDNS QR flow).
|
|
171
204
|
|
|
172
205
|
**One classified adb boundary** — every serial-targeted adb command runs through
|
|
173
206
|
`adbRun()` in `lib/device-build.js`:
|