mobridge-mcp 0.8.0 → 0.8.2
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 +17 -8
- package/dist/main.obf.cjs +1 -1
- package/dist/protocol/schemas/tools.schema.json +1 -0
- package/dist/protocol/schemas/tools.v2.schema.json +1 -1
- package/integrity.json +2 -2
- package/loader.cjs +1 -1
- package/package.json +1 -1
- package/resources/android/app-developer-release.apk +0 -0
package/README.md
CHANGED
|
@@ -136,14 +136,23 @@ Two or more steps: send a JSONL plan instead of many calls. The daemon keeps the
|
|
|
136
136
|
|
|
137
137
|
## Troubleshooting
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
| `
|
|
142
|
-
|
|
143
|
-
| `
|
|
144
|
-
| `
|
|
145
|
-
| `
|
|
146
|
-
|
|
|
139
|
+
`mobile.device.connect` does the whole setup: installs the companion APK if missing, updates it when it differs from the host version, enables Accessibility over ADB, creates the port forward and waits for the companion to answer. You never run `adb` yourself. If it fails, read `error.code`, then `details.diagnostics` and `recovery[0]`:
|
|
140
|
+
|
|
141
|
+
| Symptom / `error.code` | Cause | Fix |
|
|
142
|
+
|---|---|---|
|
|
143
|
+
| `COMPANION_NOT_READY` ("socket hang up") | The companion did not answer the handshake. `details.diagnostics` says why: not installed, version mismatch, Accessibility off, service not bound, process not running. | Run `mobridge connect` again (it installs/updates). On Android 13+ a sideloaded app may need Settings > Apps > MoBridge Runtime > ⋮ > *Allow restricted settings* before Accessibility can be enabled. If the service is not bound, open the MoBridge Runtime app once and exclude it from battery optimisation. |
|
|
144
|
+
| `COMPANION_INSTALL_BLOCKED` | The phone refused the USB install (Xiaomi/Oppo/Vivo/Samsung prompts, Play Protect). | Follow `recovery`: unlock and tap Install/Allow; Xiaomi: enable *Install via USB* and *USB debugging (Security settings)*; then `mobridge connect`. |
|
|
145
|
+
| `ACCESSIBILITY_ENABLE_BLOCKED` | The phone refused to enable Accessibility over ADB. | Xiaomi: *USB debugging (Security settings)*; or enable it by hand in Settings > Accessibility; Android 13+: *Allow restricted settings* first. |
|
|
146
|
+
| `COMPONENT_MISSING` | No APK to install. | Re-run `npx -y mobridge-mcp@latest install`, or set `MSM_COMPANION_APK`. |
|
|
147
|
+
| `EXTERNAL_INSTRUMENTATION_ACTIVE` | Another tool (UiAutomator, a test runner, another agent) holds UiAutomation. | Stop it, then `mobridge connect`. |
|
|
148
|
+
| `ACCESSIBILITY_PREEMPTED` | Service enabled but unbound. | Wait a few seconds, then `mobridge connect`. |
|
|
149
|
+
| `ADB_UNAUTHORIZED` / `DEVICE_OFFLINE` | USB debugging not authorised, or no device. | Unlock the phone, accept the prompt, check `adb devices`. |
|
|
150
|
+
| `AMBIGUOUS_DEVICE` | Several devices attached. | Pass `deviceId` (`mobridge devices`). |
|
|
151
|
+
| `TRANSPORT_DEGRADED` | Link dropped. | Prefer USB over wireless adb; `mobridge health` shows the socket state. |
|
|
152
|
+
| `UNSUPPORTED_PLATFORM` | iOS requested. | Only Android is supported. |
|
|
153
|
+
| Companion disables itself | By design after 5 minutes without a controller. | The next connect re-arms it. |
|
|
154
|
+
|
|
155
|
+
Still stuck: `mobridge doctor`, `mobridge health`, and report `details.diagnostics` with the error.
|
|
147
156
|
|
|
148
157
|
## CLI contract
|
|
149
158
|
|