Skip to content

fix(deps): update rust crate mtp-rs to 0.25.0#38

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/mtp-rs-0.x
Open

fix(deps): update rust crate mtp-rs to 0.25.0#38
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/mtp-rs-0.x

Conversation

@renovate

@renovate renovate Bot commented Jul 18, 2026

Copy link
Copy Markdown

This PR contains the following updates:

Package Type Update Change
mtp-rs dependencies minor 0.23.00.25.0

Release Notes

vdavid/mtp-rs (mtp-rs)

v0.25.0

Compare Source

Library 0.25.0, CLI 0.7.0. Diagnostics so device-specific bugs can be captured by the reporter instead of reproduced on identical hardware (follow-up to the #​18 Samsung cancel-wedge work in 0.24.0).

Added
  • [lib] Opt-in tracing feature for device-protocol diagnostics. Off by default (no dependency, no cost); enable it and install any tracing subscriber to emit events on the transaction and cancel/reset paths. Purpose-built so a bug reporter can capture what their device actually does (issue #​18) instead of us reproducing on identical hardware. The cancel/reset path logs at debug, per-operation execution at trace.
  • [cli] --trace flag and richer doctor. mtp-rs --trace <cmd> prints the cancel/reset diagnostics to stderr (RUST_LOG overrides for finer control, e.g. mtp_rs=trace for per-operation detail). doctor now prints device capabilities, and doctor --probe-cancel runs a cancel-health check (download a file, cancel mid-stream) that classifies the device as healthy, wedged_recovered (#​18), or errored — the one-command artifact to attach to a freeze report.
  • [lib] force_cancel_wedge(serial) virtual-device test hook (feature virtual-device). Arms a one-shot so the next cancel_transfer returns Error::DeviceReset, letting the #​18 cancel-wedge contract be regression-tested with no hardware.

v0.24.0

Compare Source

Library 0.24.0, CLI 0.6.0.

Fixed
  • [lib] Recover from the Samsung "large-backlog cancel" wedge instead of hanging (#​18). Cancelling a held-open streaming download while the device still had a large bulk backlog queued (classically the first download right after a fresh USB connect) wedged the PTP session on Samsung phones (reproduced on a Galaxy S23 Ultra): the drain read the whole backlog and idled out without ever seeing the closing Response container, the device stopped answering, and cancel() returned a false success so the consumer's next call hung, looking like a mid-transfer freeze. cancel_transfer now detects the wedge (GET_DEVICE_STATUS timing out, distinct from an unsupported-op stall), issues a session-less USB DEVICE_RESET to un-stick the transport, and returns the new Error::DeviceReset instead of a false success. It deliberately does not reopen: post-reset these devices need a span of quiet to tear the old session down, so reopen is the caller's job (drop the device, wait a few seconds, reopen with idle-spaced backoff; hammering re-wedges it). download_windowed avoids the path entirely (no multi-MB backlog to cancel). Reported by @​qarmin.
  • [lib] Ranged, windowed, and resumable downloads now work on devices that only advertise the 32-bit GetPartialObject. Previously download with a ByteRange::From/Range, download_windowed, and read_range all hard-required GetPartialObject64 (0x95C1), the 64-bit-offset op. Many PTP cameras (e.g. the Panasonic Lumix DMC-TZ61, #​12) only advertise the 32-bit GetPartialObject (0x101B), so these calls failed with Unsupported. The backend now falls back to the 32-bit op for any offset that fits in u32 (files up to 4 GiB); a resume past 4 GiB still needs the 64-bit op (returns Error::InvalidData), and a device with neither op returns Error::Unsupported. The op selection (plan_partial_read) is unit-tested, and the 32-bit path is covered end-to-end against a virtual device configured without the 64-bit op.
Changed
  • [lib] Breaking: new PtpError::DeviceReset variant. The low-level ptp::PtpError enum is not #[non_exhaustive], so code that exhaustively matches it must add an arm. The neutral mtp::Error gains the same DeviceReset variant but is #[non_exhaustive], so matching it with a wildcard arm is unaffected. See the #​18 fix above for what the variant means.
  • [workspace] Real-device debugging hub and test-harness hardening. docs/debugging.md is now a debugging hub (macOS ptpcamerad blocker, software-reset recovery, fast-fail timeouts, Samsung/Android gotchas), linked from AGENTS.md. Integration tests read an MTP_TEST_TIMEOUT_SECS override (default 30) so a wedged or absent device skips fast instead of stalling, and an opened device reporting zero storages (a half-authorized phone) now skips cleanly instead of panicking.
  • [lib] Breaking (test support): VirtualDeviceConfig gains a supports_partial_object_64: bool field (feature virtual-device). Set it true to keep the previous behavior; set it false to model a camera that only implements the 32-bit GetPartialObject and exercise the fallback above. Only affects code that constructs VirtualDeviceConfig directly (test setups).
  • [workspace] Opt-in integration-test env flags now test the value, not mere presence. MTP_RUN_SLOW_TESTS=0 and MTP_RUN_DROP_RECOVERY=0 used to enable the gated test (a bare "is the var defined" check); they now correctly mean "off". Only 1/true/yes/on enable. Reported by @​juleskers in #​12.

Configuration

📅 Schedule: (in timezone Europe/Budapest)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/mtp-rs-0.x branch from 87cf6f3 to 81e1a81 Compare July 18, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants