S024: iPhones over usbmuxd and AFC as ios:// locations
Hotplug via usbmuxd Listen (hidden when the socket is missing), pairing with a Trust prompt, AFC list/stat/stream/mkdir/rename/delete, Devices entries merged with MTP, Eject in the place menu, ios_location example. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
6df9b5603d
commit
bf1fb7855d
1 changed files with 1236 additions and 50 deletions
|
|
@ -200,6 +200,16 @@ One entry per session, newest last, ≤ 15 lines: done, verified how, not done,
|
|||
- Not done: no live window (typing, drop, clicks, progress bar motion, scrolling); no file chooser for the cover (path field or drop); a mixed field can't be cleared on purpose (only set); lookup apply doesn't offer per-field choice; offline/busy messages not seen live.
|
||||
- Later: file chooser; per-field "clear" for mixed values; recording search by title when no album; lookup for one file with no album tag uses the file name.
|
||||
|
||||
## S024 — iOS devices over AFC
|
||||
- Done: `tunal_devices::ios::IosLocation` (`Location`, scheme `ios`): `ios://<udid>/<path>` on the AFC media folder; list (+ stat per entry, chunks of 256), stat, open_read (own AFC connection, 1 MiB reads), open_write (own connection, streamed, closed on drop; CreateNew/dir → Exists), mkdir, rename (Exists check), delete (permanent; trash Unsupported so the UI confirms). AFC errors → NotFound/PermissionDenied/Exists/NotEmpty; lost socket drops the client.
|
||||
- `ios::watch(location, on_change)`: usbmuxd Listen on a 1-worker tokio runtime; USB devices only (Wi-Fi duplicates skipped); no socket → retry every 3 s silently (udev starts usbmuxd on plug). Socket from `USBMUXD_SOCKET_ADDRESS`, else `/var/run/usbmuxd`.
|
||||
- Setup thread per device: pair record from usbmuxd, else lockdown `pair` (problem "Unlock the iPhone and tap Trust", retries while locked/pending), record saved to usbmuxd; stale record (InvalidHostID) deleted and re-paired; DeviceName from lockdown. Problems show as the folder error.
|
||||
- **Shared device API**: `tunal_devices::DevicePlace {name, uri}` (moved from mtp, re-exported there). `devices_bridge::register` now returns `Backends` (MTP + iOS); Devices section merges both lists. Place menu on an `ios://` entry: "Eject" (closes the connection, hidden until replugged) via `devices_bridge::{can_eject, eject}`.
|
||||
- Deps: `idevice` 0.1.68 (no default features; `ring`, `usbmuxd`, `afc`, `pair` — no aws-lc, D-019), `tokio` (rt-multi-thread, net, time).
|
||||
- Verified: workspace build, clippy -D warnings, fmt --check; `cargo run -p tunal-devices --example ios_location` (new) with the real usbmuxd and with `USBMUXD_SOCKET_ADDRESS=/nonexistent/usbmuxd`: 0 devices, no error, unknown udid → NotFound; app screenshot both ways: Devices "No phones connected", no stderr.
|
||||
- Not done: no iPhone (D-009, S036): pairing, Trust prompt, AFC ops, eject, names all unchecked live. Symlinks shown with unknown target type. main.rs still names the backends `mtp` (left to avoid S021's file).
|
||||
- Later: eject for MTP phones; device name in breadcrumb; free space via AFC device info; a "Connecting…" entry shows the default name "iPhone" until lockdown answers.
|
||||
|
||||
## Later
|
||||
- (orchestrator) Breadcrumb: a long path is hard-clipped at the bar's left edge with no elision mark, and the root crumb elides at 960 px — for S034.
|
||||
-
|
||||
|
|
|
|||
Loading…
Reference in a new issue