Difference between revisions of "PurpleRestore"

From The iPhone Wiki
Jump to: navigation, search
(Added some information)
(reworded)
Line 1: Line 1:
[[PurpleRestore]] is a cross-platform 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
+
[[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.<sup>[citation needed]</sup>
  +
  +
Like [[iTunes]], [[PurpleRestore]] communicates with iDevices using a [[usbmux]] connection.
   
Like [[iTunes]], [[PurpleRestore]] communicates with iDevices using a [[Usbmux]] connection.
 
 
== Restore Bundles==
 
== Restore Bundles==
  +
Unlike iTunes, PurpleRestore doesn't use [[IPSW File Format|IPSW]] files to restore devices. It uses "Restore Bundles" which can be obtained from <code>afp://fieldgoal.apple.com/RestoreImages/</code> and <code>afp://endzone.apple.com/OldRestoreImages/</code>. Unfortunately, the <code>afp</code> 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.
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 those AFP shares can only be accessed when connected to Apple's internal VPN.
 
 
Luckily you can create your own Restore Bundles by extracting an [[IPSW]] into a folder. Obviously you won't get any internal / developing / debugging stuff on your iDevice since you are using a public [[IPSW]].
 
 
==Restore Components==
 
Restore Components has few options to configure.
 
 
'''- Restore Bundle:''' Specify a Restore Bundle which is used for restoring.
 
 
'''- Firmware Directory:''' Specify a firmware directory where stuff like [[LLB]], [[iBoot]], [[iBEC]] etc is taken from.
 
 
'''- RAMDisk Image:''' Specify a RAMDisk image that is used while restoring.
 
   
  +
== Restore Components ==
'''- DFU:''' Either "Debug", "Development", "Release" or a specific file can be selected.
 
  +
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 File Format|IMG3]] files are located.
  +
* '''Ramdisk Image''': Specify a [[ramdisk]] to be used (i.e. [[Restore Ramdisk|restore]] or [[Update Ramdisk|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==

Revision as of 23:17, 17 December 2012

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.

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)