The iPhone Wiki is no longer updated. Visit this article on The Apple Wiki for current information. |
PurpleRestore
PurpleRestore is a tool made by Apple and is used for flashing iDevices. Barely anything is known about it, this tool provides far more customization than iTunes. PurpleRestore-783.12 is the latest version, which can handle restores up to firmware 5.1.1.[citation needed]
Like iTunes, PurpleRestore communicates with iDevices using a usbmux connection.
Contents
Restore Bundles
Unlike iTunes, PurpleRestore doesn't use IPSW files to restore devices. It uses "Restore Bundles" which can be obtained from afp://fieldgoal.apple.com/RestoreImages/
and afp://endzone.apple.com/OldRestoreImages/
. Unfortunately, the afp
protocol can only be accessed through Apple's internal VPN.
However, you can create your own bundles by extracting an IPSW into a folder. The downside is that you don't get access to any internal/debugging stuff since it is a public firmware.
Restore Components
Restore Components has a couple of options:
- Restore Bundle: Specify the bundle to use in restoring
- Firmware Directory: Specify the folder where the LLB, iBoot, etc. IMG3 files are located.
- Ramdisk Image: Specify a ramdisk to be used (i.e. restore or update ramdisk)
- DFU: Specify what tools to upload based on a selection of "Debug", "Development", or "Release". A specific file can also be selected.
Restore OS
Restore OS options allow you to specify the following:
- Restore Boot-Args: Boot-Args used when the Restore OS is loaded. By default those arguments are used: "debug=0x14e serial=3 rd=md0 nand-enable-reformat=1 -progress"
- Firmware Type: Specify the firmware which should be flashed when restoring. This can either be "Debug", "Factory FA", "Factory SA", "Firmware Development" or "Production".
- Boot Image Type: Can be "Internal", "User or Internal", "User" or "Update".
- Boot Kernel Cache: Specify wether the "Production" or "Development" kernel cache should be used.
Restore Settings
By default PurpleRestore comes with two pre-made restore settings. "Erase Install" and "Update Install". Those restore settings are plist files that define the options PurpleRestore will use when restoring a device.
- Erase Install: Repartitions the media, erasing all data, before restoring. Includes all internal development tools and updates flash and the baseband by default.
- Update Install: Includes all internal development tools and updates flash and the baseband by default.
Reverse Engineering
This specific code is from iTunes. It will detect if PurpleRestore is running so that it does not interfere with any operations that PurpleRestore is performing.
+354 003d7808 c70424bc01d700 movl $0x00d701bc,(%esp) com.apple.PurpleRestore +361 003d780f e80c65c3ff calll 0x10000dd20 +366 003d7814 84c0 testb %al,%al +368 003d7816 7409 je 0x003d7821 +370 003d7818 c704246c8ba400 movl $0x00a48b6c,(%esp) PurpleRestore is running, ignoring device +377 003d781f ebd3 jmp 0x003d77f4 +379 003d7821 8d5de0 leal 0xe0(%ebp),%ebx +382 003d7824 895c2404 movl %ebx,0x04(%esp)