Conversation
phryneas
marked this pull request as ready for review
September 8, 2026 21:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A CC2 with a printer shell can reach its attached camera through USB, but the printer has neither ADB/Python nor hidraw. This adds a separate dependency-free Rust tool using Linux usbfs to install the existing canonical erase-fix hooks without unplugging the camera.
The tool builds as a small static ARMv7 executable. CI builds it with checksums, and manually published releases receive the same asset. No releases are created automatically.
Behavior and risk
inspectrecognizes the observed 30D signature from sysfs and explains that the patch does not apply, without opening the USB device or sending commands. Shared USB IDs alone are insufficient. For a supported HID camera, it queries the version without uploading files.install --accept-no-backup-space-riskinstalls the canonical erase-fix hook and runner, with camera-side checks and file comparisons.verifyruns a temporary post-restart probe that checks installed bytes and the live RAM correction without applying it.The requested experimental route has no exported backup or clean-space admission check. A failed write can require programmer recovery, which is not guaranteed without readable same-camera identity data. Kernel/updater fingerprints, partition/mount checks, default differing-content refusal, configuration stability checks, and file comparisons remain. The existing backup-based tools are unchanged.
Only the selected HID interface is claimed; no video-interface detachment, USB reset, firmware-image write, identity replacement, or live RAM correction occurs during installation. A session-specific RAM status channel avoids treating the expected failed command-launch commit as success. That mechanism temporarily changes the version response and leaves the HID uploader unavailable until restart. There are no upload retries.
The developer-confirmed 30D descriptors have two UVC functions and neither HID nor ADB interfaces. The classifier checks revision, strings and standard USB topology; install/verify refuse a recognized 30D before USB access. Synthetic tests cover partial signatures, malformed lengths, ambiguity and absence of side effects. This does not establish recognition of every 30D firmware version.
The usage guide includes prerequisites, exact commands, failure handling, post-restart verification and the accepted risk. Research documentation distinguishes static evidence from remaining hardware unknowns.
Validation
No supplied dumps, proprietary binaries, or device-specific identity fixtures are included.
Failure diagnostics
--verboselogs complete outgoing and incoming HID reports (including padding and upload payloads) and transport errors on stderr, before reply validation. It adds no exchanges or retries. Named worker failures use compact Fnn/Pnn codes from a shared catalog, preserving the distinction between refusal before persistent writes and failure after writes began. Offline tests cover logging disabled/enabled, malformed replies, transport failure, argument/consent validation, stale-session refusal and error-stage reporting. Camera checks and canonical installed hooks are unchanged.Managed-file diagnostics now distinguish starter versus erase hook and file type, stat failure, permission mismatch, content mismatch and comparison-command failure. Tests cover preserving an existing canonical starter while installing a missing erase hook. After a physical power cycle the developer observed F33 before writes; the supplied ADB-repaired image is not current and cannot identify the live conflicting file. The developer subsequently authorized explicit replacement of both managed scripts.
Optional managed-script replacement
install --accept-no-backup-space-risk --overwrite-managed-scriptspermits replacement of differing system.sh and enabled/10-erase-fix.sh contents, including earlier tool-generated versions. Default installation still refuses differences. The flag is rejected for inspect/verify and never bypasses firmware, identity, file type, permissions, stability or readback checks. Existing originals are copied to camera RAM outside worker cleanup and rechecked before replacement; these copies are lost on reboot and are not exported backups. Other enabled scripts are preserved. Final checks and verify require exact expected bytes. Tests cover both replacements, original preservation, other-hook preservation, partial-copy refusal, idempotency, strict verification and CLI consent.Physical installation and verification confirmed
The supplied installation log reports current-session DONE after both scripts were written and checked. The subsequent verification log reports fresh-session LIVE, confirming expected installed bytes and the active 0x1000 erase-size correction; verify does not apply that correction. Tested binary: ce33161. This establishes the replacement route on the developer's previously modified 30B, not a pristine-stock installation or independent full-flash readback. The developer also confirmed normal camera-feed operation after installation and verification. Status cleanup timing has not been separately confirmed. Documentation and console guidance now require a full printer power cycle; a shell reboot may leave the camera powered. No attached logs or firmware were uploaded to the repository.