Skip to content

feat: hold the macOS DFU guard during installs - #28

Open
paviro wants to merge 2 commits into
RepriseOS:mainfrom
paviro:feature/mac-dfu-guard
Open

paviro wants to merge 2 commits into
RepriseOS:mainfrom
paviro:feature/mac-dfu-guard

Conversation

@paviro

@paviro paviro commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Merge after #27, #29 and RepriseOS/repriseos#107, then rebase on main and move the Cargo pin from #107's head (d85811f) to the repriseos main commit that holds #105 and #107. The README conflict with #26 resolves by keeping both sections.

The app holds mac_dfu_guard from RepriseOS/repriseos#107 on the DFU, checks and installation screens, so macOS leaves the iPod in DFU. The DFU poll calls mac_dfu_guard_begin before every scan and a layout effect in App.tsx calls mac_dfu_guard_end once the flow leaves those screens. Quitting, a panic, or the next start after a crash restores the keys.

When another installer or reprise command holds the keys, the DFU screen shows "Another RepriseOS installer is working with an iPod; close it first". Other failures go to the session log once and the scan goes on without the guard. On Linux and Windows the commands do nothing.

The README describes the change under Install.

Tested on macOS without an iPod in DFU.

When an iPod classic enters BootROM DFU on macOS, AMPDevicesAgent
uploads Apple's recovery image and the iPod comes back in recovery
mode, where the installer cannot use it. The agent, and Finder's
AMPDeviceDiscoveryAgent, skip devices while the ignore-devices user
default is true in their domains.

The app holds reprise-device's mac_dfu_guard while the DFU, checks and
installation screens are shown. The DFU poll takes it before every
scan, so a refusal is retried, and a layout effect releases it when
the flow leaves those screens; the exit event restores the keys when
the app quits from one of them, since Tauri exits without dropping
managed state. A start restores the keys a crashed run left set;
a panic restores them too. On other platforms the commands do
nothing.

Another installer holding the keys stops the DFU screen, since two
installers would fight over the iPod. Any other failure to set the
keys comes back as a warning: the frontend logs it once per distinct
message with a note that macOS may move the iPod out of DFU, and the
scan goes on.
@paviro
paviro force-pushed the feature/mac-dfu-guard branch from f5a1ecd to 6ecccd7 Compare November 28, 2026 15:56
@paviro paviro changed the title feat: stop macOS from moving an iPod out of DFU feat: hold the macOS DFU guard during installs Nov 28, 2026

This branch has not been deployed

No deployments
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.

1 participant