summaryrefslogtreecommitdiffstats
path: root/src/restore.c
AgeCommit message (Collapse)AuthorFilesLines
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
2022-10-02Reduce memory usage for SourceBootObjectV4 imagesGravatar Nikias Bassen1-90/+57
2022-09-16Fix Cryptex1 and Cryptex1LocalPolicy TSS request handlingGravatar Nikias Bassen1-15/+35
2022-08-29restore: Add support for Cryptex1LocalPolicy firmware updaterGravatar Nikias Bassen1-10/+23
2022-08-29restore: use an appropriate ticket for Cryptex1 global manifestGravatar Munehisa Kamata1-7/+24
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>
2022-06-28restore: Don't print 'Attempting to continue after critical error' warning ↵Gravatar Nikias Bassen1-1/+1
when no error was detected This only occurred when using --ignore-errors command line option.
2022-06-28Make sure to exactly match the passed variant when using --variantGravatar Nikias Bassen1-1/+1
2022-06-23Support iOS 16.0 Beta 2 (#506)Gravatar Emma Lethaltail1-0/+1
2022-06-20Remove more serial number checks, and get ECID early on in all modesGravatar Nikias Bassen1-15/+9
Some devices seem to not have a serial number, usually in restore mode, which will cause the restore operation to fail since we specifically check for it. An earlier commit already removed the actual comparison in favor of comparing the ECID, but some checks would still result in restore failures as it can't retrieve the serial number on said devices at all. This commit also makes sure to get the ECID in all modes as early as possible and removes all the helper functions for it since they are not needed anymore.
2022-06-20Add support for FirmwareUpdaterPreflight messageGravatar Clément Decoodt1-0/+31
This message seems mandatory on the new versions of MacOS (12+), but it seems an empty response is what's expected.
2022-06-17restore: Fix memory corruption in restore_get_timer_firmware_dataGravatar Doron Zarhi1-1/+1
2022-06-17Add support for iOS 16Gravatar Doron Zarhi1-8/+122
2022-04-12More code improvements using _plist_dict_copy_* helperGravatar Nikias Bassen1-5/+1
2022-04-12Use proper detection for macOS restore path (instead of version number ↵Gravatar Nikias Bassen1-8/+4
comparison)
2022-04-10Fix build identity selection for beta (developer) firmwareGravatar Nikias Bassen1-2/+2
2022-04-10restore: Fixed a problem that nobody even knew existedGravatar Nikias Bassen1-6/+10
At least this has been going unnoticed until recently. For quite some time we have been sending NorImageData as array to the device, but it turned out that this was only expected for iOS < 7.0 and from then on it was supposed to be a dictionary with the components. Now we should correctly handle it.
2022-04-07tss/restore: Improve code readability with plist helpers and removal of ↵Gravatar Nikias Bassen1-33/+8
unneeded comments
2022-04-06Add support for Timer,* components and TSS found in iPad Air 5th gen firmwareGravatar Nikias Bassen1-0/+204
2022-03-07restore: Use ECID instead of serial number in restore_is_current_device() to ↵Gravatar Nikias Bassen1-14/+16
match device Some devices seem to not provide serial number information in recovery or restore mode so we use ECID instead to make sure we deal with the same device.
2021-11-27Use macros for the different restore variant stringsGravatar Nikias Bassen1-3/+3
2021-11-26Cache build manifest in client structGravatar Nikias Bassen1-8/+2
2021-11-24restore: Use new reverse proxy implementation from latest libimobiledeviceGravatar Nikias Bassen1-0/+52
with fallback to the legacy code with a compile time warning. The legacy code will be removed in the future once a newer libimobiledevice has been officially released.
2021-11-19Fix compilation on WindowsGravatar Nikias Bassen1-2/+2
2021-11-17restore: Add missing newlines to info messagesGravatar Hector Martin1-2/+2
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-17restore: Support sending BootabilityBundle (Monterey)Gravatar Hector Martin1-0/+155
This is used on macOS 12+ (Monterey and later) to allow older OSes to perform the bless2/bootability process for newer OSes, by putting a shared library in the Preboot partition that contains the specific logic required to make a given macOS install bootable. Closes: #441 Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-17idevicerestore: Identify build identity by Variant (Monterey)Gravatar Hector Martin1-3/+10
Monterey got rid of VariantSupportsGlobalSigning. Identify builds based on the Variant field (which seems to always have consistent values) instead of using RestoreBehavior and VariantSupportsGlobalSigning. Signed-off-by: Hector Martin <marcan@marcan.st>
2021-10-26Add command line option to continue despite certain errors (e.g. baseband ↵Gravatar Nikias Bassen1-0/+4
update failure)
2021-10-01restore: Fix CheckpointMsg parsing for older firmware versionsGravatar Nikias Bassen1-5/+3
Older firmware versions don't seem to always include CHECKPOINT_COMPLETE so we assume that state is false instead of aborting with an error.