Skip to content

Fork Sync - #3

Open
github-actions[bot] wants to merge 167 commits into
hack-different:masterfrom
libimobiledevice:master
Open

Fork Sync#3
github-actions[bot] wants to merge 167 commits into
hack-different:masterfrom
libimobiledevice:master

Conversation

@github-actions

Copy link
Copy Markdown

No description provided.

kamatam9 and others added 2 commits August 29, 2022 01:44
macOS 13 introduced a new global manifest for Cryptex1 and it requires
tickets found in Firmware/Manifests/restore/cryptex1/macOS Customer/
inside an IPSW, but we currently do not use the tickets and end up
unexpected behavior on a Mac device after restoring, e.g. bputil
fails to downgrade security mode due to "Cryptex1 manifest verification
failed". This adds a proper handling to use the appropriate tickets.

Signed-off-by: Munehisa Kamata <kamatam@amazon.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approved

nikias and others added 10 commits September 16, 2022 15:57
... as well as eUICC,ApProductionMode which was missing before.
In macOS 13 beta 8 or newer release, bootx seems to fail if bRequest
is 0 in the control transfer setup. Then, the device fails to enter
restore mode. Seems like something has changed in iBEC since beta 8 and
Apple Configurator 2 has set it to 1, so do the same thing.

While this could be applied for all *OS variants, it's limited to macOS
for now just to be safe.

Signed-off-by: Munehisa Kamata <kamatam@amazon.com>
nikias and others added 27 commits September 8, 2025 17:55
The logging refactoring introduced a spelling error in the boot-args string.
This commit fixes that, and also changes the boot-args handling code to priotize
Apple Silicon/MacOS recovery path before the generic iOS path.
Newer iOS version would cause an Error message despite being able to
continue, so we just ignore it.
Also Vinyl shows up with some devices, so we handle this too.
Co-authored-by: Nikias Bassen <nikias@gmx.li>
e.g. emulated ones via ChefKiss Inferno
  Add support for new data types and message types required by the macOS 27
  (build 26A5353q) restore protocol when restoring via DFU mode:

  - BootabilityBundleV2 (required): Updated bootability bundle handler
    to recognize both V1 and V2 IPSW directory prefixes. The V2 handler
    reuses the existing V1 cpio-over-connection wire protocol.

  - SourceBootObjectV5 (optional): Routes to the existing V4 handler
    which uses the same ImageName-based extract/personalize/stream flow.

  - DeviceRestoreInfoPreflight (optional): Handled as an empty-dict
    preflight acknowledgement, same as FirmwareUpdaterPreflight.

  - RestoreProtocol (optional, message type): Logged and acknowledged
    in the main message loop.

  Without BootabilityBundleV2 in SupportedDataTypes, the device's restored
  daemon fails the is_host_compatible check during DFU restore with:

    host/device compatibility check found that a message is missing
    or is not supported (required): BootabilityBundleV2
    CHECKPOINT FAILURE: This host version is unsupported.

  Tested: Erase restore of macOS 27.0 (26A5353q) via DFU on Macmini9,1
  (j274ap, M1) completes successfully.
SourceBootObjectV4 ignored GlobalManifestPrefix and
GlobalManifestSuffix and always selected apticket.<DeviceClass>.im4m,
supplying the AP manifest when another manifest family was requested.

Use the requested path components and send FileDataDone when an
optional manifest is absent. Requests without these fields retain the
existing AP-ticket path.
During Port DFU-to-DFU re-enumeration, macOS deviceinterfaced daemon can
acquire the USB interface first, making idevicerestore time out waiting
for DFU reconnection.

Add experimental flag: --exclusive-usb that keeps deviceinterfaced from
claiming the USB device for the duration of the restore, by booting it
out or repeatedly terminating it when bootout is denied (SIP on), then
reloading and starting it again on exit.

idevicerestore itself does not need to run as root for this. Only the
launchctl subcommands that manage the system-domain deviceinterfaced
daemon (bootout, bootstrap, kickstart, kill) are elevated individually
via sudo, which may prompt for a password on the controlling terminal.
Read-only queries (print) are run unprivileged. Document how to allow
these specific commands via a scoped sudoers(5) NOPASSWD rule for
unattended use.

Co-authored-by: Nikias Bassen <nikias@gmx.li>
@nikias
nikias force-pushed the master branch 2 times, most recently from b8446ca to 35dee10 Compare September 7, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.