Skip to content

Commit 25166ba

Browse files
authored
docs(skill): add remote / split / android / troubleshooting sections (#213)
* docs(skill): add remote/split/android/troubleshooting sections Expand the installed agent skill with four new sections after Shader Edit-Replay: Remote Capture Workflow, Split Mode (thin client), Android Workflow, and Troubleshooting. Also expand Core Workflow step 1 to list the four open variants (local / --proxy / --connect / --android). The existing SKILL.md predated Phase 6/7/S/7D shipping and did not mention the remote capabilities at all, leaving agents unable to discover them without reading the full command reference. * docs(skill): fix factual errors in remote/split/android/troubleshooting Code review of the first commit surfaced six factual drifts from the actual command behavior: - android setup does NOT push the APK; APK install is a separate prerequisite via 'rdc setup-renderdoc --android'. The command only calls StartRemoteServer via Device Protocol API. - 'rdc open --proxy adb://SERIAL' does NOT auto-resolve to a forwarded localhost port — that rewrite lives in _resolve_android_url which is only invoked from the --android branch. Passing adb:// through --proxy is known to crash the daemon. Recommend '--android [--serial SERIAL]'. - 'rdc remote capture --keep-remote' still emits a hint referencing the deprecated '--remote' alias, not '--proxy'. Note the drift so agents do not grep for a string the CLI no longer prints. - 'rdc doctor' only emits a dedicated remediation block for the renderdoc-module failure. Other checks inline hints into the detail string. Reworded to avoid implying uniform actionable hints. - The --listen stdout actually contains six lines; only four are labeled. Reworded to 'these four labeled lines ... among other status output'. - SSH tunnel tip used port 54321 from an unrelated example. Changed to 39920, which matches 'rdc serve --port' default.
1 parent dd4a652 commit 25166ba

1 file changed

Lines changed: 53 additions & 1 deletion

File tree

src/rdc/_skills/SKILL.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ Check setup: `rdc doctor`.
2020

2121
Follow this session lifecycle for any capture analysis task:
2222

23-
1. **Open** a capture: `rdc open path/to/capture.rdc`
23+
1. **Open** a capture:
24+
- Local: `rdc open path/to/capture.rdc`
25+
- Remote replay (Proxy): `rdc open capture.rdc --proxy host:port`
26+
- Split thin-client: `rdc open --connect host:port --token TOKEN`
27+
- Android device: `rdc open capture.rdc --android [--serial SERIAL]`
2428
2. **Inspect** metadata: `rdc info`, `rdc stats`, `rdc events`
2529
3. **Navigate** the VFS: `rdc ls /`, `rdc ls /textures`, `rdc cat /pipelines/0`
2630
4. **Analyze** specifics: `rdc shaders`, `rdc pipeline`, `rdc resources`, `rdc bindings`
@@ -196,6 +200,54 @@ rdc shader-restore EID # revert single shader
196200
rdc shader-restore-all # revert all modifications
197201
```
198202

203+
## Remote Capture Workflow
204+
205+
rdc-cli wraps `renderdoccmd remoteserver` to support PC-to-PC remote captures.
206+
207+
- `rdc serve [--port PORT] [--allow-ips CIDR] [--no-exec] [--daemon]` — launch remoteserver on the target machine
208+
- `rdc remote connect <host:port>` — save remote connection state
209+
- `rdc remote list` — enumerate capturable apps on the remote
210+
- `rdc remote capture <app> -o frame.rdc [--args ...] [--frame N] [--keep-remote]` — inject, capture, and transfer back. `--keep-remote` skips the transfer and prints the remote path; replay it with `rdc open <path> --proxy host:port`. (The CLI's own `next:` hint currently still references the deprecated `--remote` alias for `--proxy`.)
211+
- `rdc open frame.rdc --proxy host:port` — remote-backed replay (daemon local, GPU remote)
212+
213+
`remote_state.py` persists the last connected host so subsequent `rdc remote list` can omit `--url`.
214+
215+
## Split Mode (thin client)
216+
217+
Split mode decouples CLI and daemon — run the daemon where the GPU is and connect from a machine that doesn't need the renderdoc module. Useful when the analyst's laptop is macOS/Windows and the GPU is on a Linux server.
218+
219+
- Server side: `rdc open capture.rdc --listen [ADDR[:PORT]]`
220+
- Prints these four labeled lines to stdout (among other status output): `host: ADDR`, `port: PORT`, `token: TOKEN`, `connect with: rdc open --connect ADDR:PORT --token TOKEN`
221+
- Client side: `rdc open --connect HOST:PORT --token TOKEN`
222+
223+
SSH tunnel tip (use the port from `--listen`, or `rdc serve`'s default `39920`): `ssh -L 39920:localhost:39920 user@server`, then connect to `localhost:39920`.
224+
225+
Every normal command (`rdc draws`, `rdc rt`, ...) works transparently in Split mode. Binary exports use `file_read` RPC with raw binary frames — no base64 overhead.
226+
227+
## Android Workflow
228+
229+
- Prerequisite: the RenderDoc APK must already be installed on the host via `rdc setup-renderdoc --android` (upstream) or `--android --arm` (ARM PS fork for Mali). `rdc android setup` does not push the APK itself.
230+
- `rdc android setup [--serial SERIAL]` — starts remoteserver on the device via RenderDoc's Device Protocol API (`StartRemoteServer`), sets adb forward, saves remote state.
231+
- `rdc android capture <activity> [--serial SERIAL] [--timeout N] [--port PORT] [-o out.rdc]` — GPU debug layers based capture (works around EMUI/Mali injection limitations).
232+
- `rdc android stop [--serial SERIAL]` — stops the remoteserver and cleans state.
233+
- For remote replay: `rdc open frame.rdc --android [--serial SERIAL]` — this is the only form that rewrites the saved `adb://SERIAL` to the forwarded `localhost:PORT`. Passing `--proxy adb://SERIAL` directly bypasses the rewrite and is known to crash the daemon (see `session.py:_resolve_android_url`).
234+
235+
Hardware matrix: Adreno is the happy path; Mali may need the ARM Performance Studio fork (see `rdc setup-renderdoc --android --arm`).
236+
237+
## Troubleshooting
238+
239+
Always run `rdc doctor` first. It reports status for renderdoc module, renderdoccmd, adb, Android APK, and platform-specific toolchains. Only the missing-renderdoc-module case emits a dedicated build-hint block; other checks surface inline hints in the detail column, so read each failing line rather than relying on a uniform next-step list.
240+
241+
Common failure categories (conceptual, not literal error strings — map from the text the tool actually emits):
242+
243+
- **network / connect failed** — remote host unreachable, firewall, wrong port. Verify `rdc serve` is running on the target.
244+
- **version mismatch** — host and target RenderDoc versions differ. Re-run `rdc setup-renderdoc` or `rdc setup-renderdoc --android` to align.
245+
- **inject failed / ident=0** — injection blocked (Android EMUI, macOS SIP, Windows privilege). Run `rdc doctor` and check the platform-specific detail.
246+
- **OpenCapture unsupported** — local GPU can't replay the capture's API surface; switch to `--proxy` or `--android` remote replay.
247+
- **not loaded / no session** — forgot `rdc open`; use `rdc status` to inspect.
248+
249+
For long operations (large capture transfers, remote replay init), the CLI has limited progress feedback — this is a known UX gap, not a hang. Wait up to the `--timeout` value before concluding failure.
250+
199251
## Command Reference
200252

201253
For the complete list of all commands with their arguments, options, types, and defaults, see [references/commands-quick-ref.md](references/commands-quick-ref.md).

0 commit comments

Comments
 (0)