summaryrefslogtreecommitdiffstats
path: root/src/restore.c
AgeCommit message (Collapse)AuthorFilesLines
39 hoursrestore: Add support for restoring macOS 27 IPSWs via DFUHEADmasterGravatar Nima Vasseghi1-6/+33
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.
2025-10-02Fix baseband processing with Mav25 (and possibly others too)Gravatar Nikias Bassen1-4/+13
2025-09-29Fix Mav baseband stitchingGravatar Nikias Bassen1-2/+4
2025-09-26Add support for Mav25 baseband firmware (iPhone 17 family)Gravatar Visual Ehrmanntraut1-33/+40
Co-authored-by: Nikias Bassen <nikias@gmx.li>
2025-09-26restore: Suppress progress bars for smaller PersonalizedBootObjectV3 imagesGravatar Nikias Bassen1-1/+3
2025-09-26restore: Handle new Centauri and Jasmine (Savage) updatersGravatar Nikias Bassen1-3/+20
Also Vinyl shows up with some devices, so we handle this too.
2025-09-26restore: Dump TSS requests and responses in debug log levelGravatar Nikias Bassen1-2/+3
2025-09-25restore: Silence messages around AEA first chunk / URLAsset handlingGravatar Nikias Bassen1-5/+9
Newer iOS version would cause an Error message despite being able to continue, so we just ignore it.
2025-09-12Add SE,ChipID for M4Gravatar Nikias Bassen1-1/+1
2025-07-15restore: Adapt log level of previous restore log and reverse proxy messagesGravatar Nikias Bassen1-3/+3
We do not want to write these to terminal by default.
2025-07-01Silence more compiler warningsGravatar Nikias Bassen1-1/+1
2025-07-01Update codebase to use (const) void* and size_t where applicableGravatar Nikias Bassen1-65/+57
2025-06-27restore: Fix curl_easy_setopt compiler warningGravatar Nikias Bassen1-1/+1
2025-06-23Refactor logging and add logfile supportGravatar Nikias Bassen1-544/+558
idevicerestore will now also create a logfile automatically, unless disabled with --logfile=NONE.
2024-10-15Fix iPhone 16 restore from normal mode and add support for RecoveryOSGravatar Nikias Bassen1-26/+365
2024-09-19Replace sprintf with snprintfGravatar Nikias Bassen1-12/+13
2024-09-19restore: Add SupportedAsyncDataTypes for both iOS and macOSGravatar Florian Brandstetter1-7/+9
2024-09-18restore: Fix incorrect fallback caseGravatar tihmstar1-2/+2
When the updated behavior is not triggered, the legacy behavior must be correctly executed. Thus, always correctly fall back to old behavior instead of aborting here. For example message can be NULL when restoring iOS 1.0 (in my fork).
2024-09-18restore: Only send FirmwareData when it has been requestedGravatar Nikias Bassen1-21/+101
2024-09-18restore: Make sure to error out when async data request handler can't be startedGravatar Nikias Bassen1-0/+3
When passing --ignore-errors, it would not fail when the async data request handler thread cannot be started, and might end up waiting forever for something to happen.
2024-09-18restore: Make wait for URLAsset on first chunk optionalGravatar Nikias Bassen1-5/+15
2024-07-01Fix heap buffer overflow in URLAsset handlingGravatar Nikias Bassen1-1/+1
2024-06-26restore: Always try to use DeviceGeneratedRequest data for TSS requests if ↵Gravatar Nikias Bassen1-15/+45
present
2024-06-24Add support for iOS 18 restore processGravatar Nikias Bassen1-107/+697
2024-06-22restore: Remove `device` from the parameters of the functionsGravatar Nikias Bassen1-16/+26
2024-06-22restore: Remove `build_identity` from the parameters of the functionsGravatar Nikias Bassen1-96/+173
2024-05-23Link against the new libtatsu and remove tss codeGravatar Nikias Bassen1-1/+1
2024-05-14Require libplist 2.6.0Gravatar Nikias Bassen1-41/+32
2024-05-05Updated to use libplist 2.5.0 APIGravatar Nikias Bassen1-44/+44
2023-11-27restore: Only print progress bar for images larger than 16 MBGravatar Nikias Bassen1-1/+1
2023-11-21Update libzip API usage to use non-deprecated functionsGravatar Nikias Bassen1-11/+12
2023-11-15restore: Fix UaFGravatar tihmstar1-2/+2
`fsname_base` points inside the dynamically allocated `path` which is freed before `fsname_base` is used, creating a use-after-free condition. This commits makes sure to free `path` only after it is no longer needed.
2023-11-09Print progress for large components (e.g. Cryptex)Gravatar Nikias Bassen1-7/+34
2023-11-02Extract OS component when using older ipsw archivesGravatar Nikias Bassen1-1/+16
Older ipsw archives have the root filesystem stored in compressed format rather than just "stored". The "Verifying Filesystem" step would then fail as compressed files are not seekable in ZIP files. This commit introduces a detection for this and has the filesystem extracted should it be required. If not using a cache path, the temp file used for extraction will be deleted after the procedure is completed.
2023-10-06restore: Also print checkpoint warning messagesGravatar Nikias Bassen1-0/+4
2023-10-06restore: Add Ace3 as known updater name to suppress error messageGravatar Nikias Bassen1-0/+6
2023-10-06restore: Skip adding FirmwareData to FirmwareResponseData for RoseGravatar Nikias Bassen1-0/+6
2023-10-04restore: Improve checkpoint log output again, make sure to always check for ↵Gravatar Nikias Bassen1-5/+8
errors Turns out even with a CHECKPOINT_RESULT of 0 we can still have a CHECKPOINT_ERROR string.
2023-10-04restore: Refine checkpoint log outputGravatar Nikias Bassen1-6/+15
2023-10-04restore/tss: Prefer DeviceGeneratedRequest for Rose TSS request, and add ↵Gravatar Nikias Bassen1-4/+10
missing tag
2023-10-02restore: Add new SE,ChipID 0x36 to list of known valuesGravatar Nikias Bassen1-1/+1
2023-10-02restore: Attributed status code 50 with SEP load failureGravatar Nikias Bassen1-0/+1
2023-10-02restore: Handle SepStage1 (SEPPatchImageData) in NORImageDataGravatar Nikias Bassen1-0/+25
2023-09-14Refactor ipsw code to transparently stream images directly from ZIP or ↵Gravatar Nikias Bassen1-9/+26
extracted ipsw This allows flashing directly from IPSW archive without having to extract it first, and ultimately removes the "Extracting filesystem from IPSW" part. Restoring from extracted IPSW is also supported, just pass the path to the directory that has all the files from a given IPSW.
2023-09-13restore: Remove plist debug print for non-existent UniqueBuildIDGravatar Nikias Bassen1-1/+4
and print it in a better format if it does exist
2023-07-25Add generic TSS request generatorGravatar Clément Decoodt1-2/+67
This uses the DeviceGeneratedRequest and DeviceGeneratedTags to generate the full TSS request. This allows to have a more future-proof approach to new firmware names they add.
2023-07-25Add SE,ChipID 0x2CGravatar Clément Decoodt1-1/+1
2023-05-23Use DeviceGeneratedRequest plist for SE TSS requestsGravatar Clément Decoodt1-6/+17
2022-10-19restore: Fix compilation error due to wrong variable nameGravatar Nikias Bassen1-2/+2
2022-10-19restore: Only print boot object v3/v4 plist in debug modeGravatar Nikias Bassen1-2/+8