IPhone Restore Procedure

iTunes side
iTunes has pretty much no say in how the restore goes along. It will send the DeviceTree, RAMDisk, and Kernel (respectively, as far as I know), but in firmwares 1.1.1 and up the program on the RAMDisk pretty much runs the show. On the Restore RAMDisk, it is called 'restored_external'. On the Update RAMDisk, it is called 'restored_update'.

iPhone side (Pre-Restore Preparation)
Code that enables USB MUX (kernel module that forwards USB connections to TCP ports) by Comex: http://pastie.org/970295 See also: USBMuxConnectByPort

iPhone side (Procedure)

 * Wait For Storage Device (wait_for_storage_device)
 * Create Filesystem Partitions (create_filesystem_partitions)
 * ASR Stuff (restore_images)
 * Mount Filesystems (mount_filesystems)
 * Fix Up /Var (fixup_var)
 * Unmount Filesystems (unmount_filesystems)
 * Clear Persistent Boot Args (clear_persistent_boot_args)
 * NOR Update Prep(update_NOR)

Actual NOR Update Routine(Img3_update_NOR)
During this procedure, the system will start flashing the NOR. Interestingly, on devices that don't actually have a NOR (since the iPod touch (3rd generation)), this process still runs and flashes to a special firmware section of the NAND.


 * Flash Individual NOR Image(Img3_flash_NOR_image)
 * Update Baseband (update_baseband)====
 * Set Boot Stage (set_boot_stage)====
 * End NAND Epoch Update (end_nand_epoch_update)
 * Set Final NVRAM Arguments (no official name)

Computer-Side Restore Log
//struct that the restore daemon gets the information for and sends back to iTunes 2008-10-19 16:46:57.000 iTunes[221:13fe7]: type query response = {type = mutable, count = 5, capacity = 12, pairs = (	3 : {contents = "SerialNumber"} = {contents = "xxxxxxxxxxx"} //censored for obvious reasons	5 : {contents = "Result"} = {contents = "Success"}	9 : {contents = "Type"} = {contents = "com.apple.mobile.restored"}	12 : {contents = "HardwareModel"} = {contents = "N82AP"}	13 : {contents = "RestoreProtocolVersion"} = {value = +11, type = kCFNumberSInt32Type} )}

//??? 2008-10-19 16:46:57.000 iTunes[221:13fe7]: unable to open /Users/willstrafach/Library/Caches/Cleanup At Startup/iPhone Temporary Files/Firmware/device_map.txt: No such file or directory

//device type 2008-10-19 16:46:57.000 iTunes[221:13fe7]: board config = n82ap

//restore process 2008-10-19 16:46:57.000 iTunes[221:13fe7]: : operation 28 progress -1 //start iPhone Restore Daemon routine. 2008-10-19 16:46:57.000 iTunes[221:13fe7]: : operation 11 progress -1 //start iPhone Restore Daemon routine. [Creating partition map] 2008-10-19 16:46:57.000 iTunes[221:13fe7]: : operation 12 progress -1 //Creating filesystem on root partition. all prepared! after this point it performs a wipe and does the actual partition creation. 2008-10-19 16:47:03.000 iTunes[221:13fe7]: : operation 12 progress -1 //Creating filesystem on var partition 2008-10-19 16:47:09.000 iTunes[221:13fe7]: : operation 13 progress 0 //starting iPhone Restore Daemon routine. // This restores rootfs image via ASR 2008-10-19 16:47:19.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 1 2008-10-19 16:47:27.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 5 2008-10-19 16:47:28.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 6 2008-10-19 16:47:31.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 7 2008-10-19 16:47:33.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 8 2008-10-19 16:47:36.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 9 2008-10-19 16:47:38.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 10 2008-10-19 16:47:39.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 11 2008-10-19 16:47:40.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 12 2008-10-19 16:47:41.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 13 2008-10-19 16:47:41.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 14 2008-10-19 16:47:43.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 15 2008-10-19 16:47:44.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 16 2008-10-19 16:47:45.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 17 2008-10-19 16:47:46.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 18 2008-10-19 16:47:47.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 19 2008-10-19 16:47:48.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 20 2008-10-19 16:47:49.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 21 2008-10-19 16:47:50.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 22 2008-10-19 16:47:51.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 23 2008-10-19 16:47:52.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 24 2008-10-19 16:47:54.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 25 2008-10-19 16:47:55.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 26 2008-10-19 16:47:56.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 27 2008-10-19 16:47:57.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 28 2008-10-19 16:47:58.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 29 2008-10-19 16:47:59.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 30 2008-10-19 16:48:00.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 31 2008-10-19 16:48:01.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 32 2008-10-19 16:48:03.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 33 2008-10-19 16:48:04.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 34 2008-10-19 16:48:04.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 35 2008-10-19 16:48:05.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 36 2008-10-19 16:48:06.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 37 2008-10-19 16:48:07.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 38 2008-10-19 16:48:08.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 39 2008-10-19 16:48:09.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 40 2008-10-19 16:48:10.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 41 2008-10-19 16:48:13.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 42 2008-10-19 16:48:14.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 43 2008-10-19 16:48:15.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 44 2008-10-19 16:48:17.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 45 2008-10-19 16:48:18.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 46 2008-10-19 16:48:18.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 47 2008-10-19 16:48:20.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 48 2008-10-19 16:48:21.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 49 2008-10-19 16:48:23.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 50 2008-10-19 16:48:26.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 51 2008-10-19 16:48:26.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 52 2008-10-19 16:48:28.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 53 2008-10-19 16:48:29.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 54 2008-10-19 16:48:30.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 55 2008-10-19 16:48:32.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 56 2008-10-19 16:48:33.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 57 2008-10-19 16:48:34.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 58 2008-10-19 16:48:36.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 59 2008-10-19 16:48:37.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 60 2008-10-19 16:48:38.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 61 2008-10-19 16:48:40.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 62 2008-10-19 16:48:44.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 63 2008-10-19 16:48:46.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 64 2008-10-19 16:48:47.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 65 2008-10-19 16:48:49.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 66 2008-10-19 16:48:51.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 67 2008-10-19 16:48:52.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 68 2008-10-19 16:48:53.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 69 2008-10-19 16:48:54.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 70 2008-10-19 16:48:56.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 71 2008-10-19 16:48:57.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 72 2008-10-19 16:48:58.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 73 2008-10-19 16:48:59.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 74 2008-10-19 16:48:59.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 75 2008-10-19 16:49:00.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 76 2008-10-19 16:49:00.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 77 2008-10-19 16:49:01.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 78 2008-10-19 16:49:01.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 79 2008-10-19 16:49:02.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 80 2008-10-19 16:49:02.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 81 2008-10-19 16:49:03.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 82 2008-10-19 16:49:03.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 83 2008-10-19 16:49:04.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 84 2008-10-19 16:49:04.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 85 2008-10-19 16:49:05.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 86 2008-10-19 16:49:05.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 87 2008-10-19 16:49:06.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 88 2008-10-19 16:49:06.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 89 2008-10-19 16:49:06.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 90 2008-10-19 16:49:07.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 91 2008-10-19 16:49:07.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 92 2008-10-19 16:49:08.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 93 2008-10-19 16:49:08.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 94 2008-10-19 16:49:09.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 95 2008-10-19 16:49:09.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 96 2008-10-19 16:49:10.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 97 2008-10-19 16:49:10.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 98 2008-10-19 16:49:11.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 13 progress 100 2008-10-19 16:49:11.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 14 progress -1 //Verifying that restore was successful 2008-10-19 16:50:32.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 15 progress -1 //starting iPhone Restore Daemon routine. //Checking filesytem on root partition 2008-10-19 16:50:39.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 16 progress -1 //Mounting filesystem on root partition 2008-10-19 16:50:39.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 15 progress -1 //Checking filesytem on var partition 2008-10-19 16:50:39.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 16 progress -1 //mounting filesystem on var partition //this message is sent when both partitions have been successfully mounted and checked for errors. 2008-10-19 16:50:44.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 17 progress -1 //starting iPhone Restore Daemon routine. 2008-10-19 16:52:32.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 29 progress -1 //starting iPhone Restore Daemon routine. //unmounting rooot filesystem 2008-10-19 16:52:32.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 29 progress -1 //unmounting var filesystem 2008-10-19 16:52:33.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 25 progress -1 //starting iPhone Restore Daemon routine. 2008-10-19 16:52:33.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 35 progress -1 //starting iPhone Restore Daemon routine. Loading NOR data to flash 2008-10-19 16:52:33.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 18 progress -1 //starting iPhone Restore Daemon routine. 2008-10-19 16:53:32.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 20 progress -1 //starting iPhone Restore Daemon routine. 2008-10-19 16:53:32.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: operation 32 progress -1 //starting iPhone Restore Daemon routine.

//restore finished with no errors 2008-10-19 16:53:32.000 iTunes[221:13fe7]: device returned status 0 2008-10-19 16:53:32.000 iTunes[221:13fe7]: <Restore Device 0x114f4a00>: Restore succeeded 2008-10-19 16:53:32.000 iTunes[221:13fe7]: _AMRestoreModeDeviceFinalize: 0x114f4a00

iPhone-Side Log (iPhone 4 on 4.0)
on ARM Device=uart2 at 0x82700000(0xd2c26000) AppleS5L8900XSerial: Identified Serial Port on ARM Device=uart3 at 0x82800000(0xd2c35000) AppleS5L8900XSerial: Identified Serial Port on ARM Device=uart6 at 0x82b00000(0xd2c7d000) [000000.367924]: AppleSamsungDPTXController::disableInterrupts: disabling [000000.000042]: AppleSamsungDPTXController::disableInterrupts: _outstandingIO=0 _pendingDisable=0 HighlandParkAudioDevice::start: 0x82063000, highland-park mIICNub: 0x81e19e00, mIISNub: 0x8243fe80, mSerialNub: 0x82442200, sampleRate = 44100, ol=8, oi=7 AppleAP3GDL::probe found device with ID: 0xd3 AppleAP3GDL::handleStart _calibrationMatrix [64814 -485 -28] [817 61868 104] [475 19 62579] AppleAP3GDL::handleStart _calibrationInverseMatrix [66259 519 29] [-874 69415 -115] [-502 -24 68633] AppleBaseband: inconsistent mux function setup (0 0 0 0 0 0) AppleNANDFTL started with IOFlashStoragePartition provider AppleNANDFTL located at physical nand block offset 16 metadata-whitening was found and it's set to 1 default-ftl-version was found and it's set to 1 diag-bits is supplied by AppleNANDFTL [FTL:MSG] Apple NAND Driver (AND) RW [FTL:MSG] FIL_Init           [OK] [FTL:MSG] BUF_Init           [OK] [FTL:MSG] FPart Init         [OK] AppleMultitouchN1SPI: successfully started AppleMultitouchN1SPI: using DMA for bootloading AppleMultitouchN1SPI: Logging is ENABLED virtual bool AppleCLCD::start_hardware(IOService*), ditherCfg: 0x80000001 mIsDitherFor8Bits: 1 IOReturn AppleCLCD::set_ditherTable_state(bool), mIsDitherFor8Bits is true, no dynamic dither table. IOSurface: buffer allocation size is zero AppleM2ScalerCSCDriver: Added framebuffer device: AppleCLCD id: c8124000 AppleRGBOUT: TVOUT device is detected AppleMultitouchN1SPI: detected HBPP. driver will be kept alive AppleD1815PMUPowerSource: AppleUSBCableDetect 1 AppleD1815PMUPowerSource: AppleUSBCableType USBHost AppleEmbeddedUSBArbitrator::_usbCableTypeNotificationGated : cableType: USBHost AppleEmbeddedUSBArbitrator::handleUSBCableTypeChange : Connected to a USB Host AppleEmbeddedUSBNub::withProvider : allocated new nub 0x824c5680 AppleEmbeddedUSBNub::initWithProvider : finished nub init AppleEmbeddedUSBArbitrator::_publishNubs : nub published AppleSynopsysOTGDevice::init : Logging Buffer Length = 4K AppleSynopsysOTGDevice::start : object is 0x82a34800, registers at 0xd3bbe000, 0x86100000 physical AppleSynopsysOTGDevice::findMaxEndpoints: in EPs: 7, out EPs: 7, max_endpoint: 8, num_endpoints: 14 AppleSynopsysOTGDevice::handleUSBCableConnect cable connected, but don't have device configuration yet AppleSynopsysOTGDevice::start : start finished AppleImage3NORAccess::start imageVersion: 3 IOSDIOController::enumerateSlot: Searching for SDIO device in slot: 0 IOSDIOController::enumerateSlot: Found SDIO I/O device. Function count(1), memory(0) IOSDIOIoCardDevice::parseFn0CIS: Device manufacturer ID 0x2d0, Product ID 0x4329 IOSDIOIoCardDevice::parseFn0CIS: Manufacturer: "" IOSDIOIoCardDevice::parseFn0CIS: Product:     "" IOSDIOIoCardDevice::parseFn0CIS: ProductInfo0: "s=B1" IOSDIOIoCardDevice::parseFn0CIS: ProductInfo1: "P=N90 m=3.1 V=m" AppleBCMWLAN::init: AppleBCMWLAN-42 May 26 2010 22:44:52 AppleBCMWLAN::init: Starting with debug level: 4, debug flags: 00000000 AppleBCMWLAN::init: AppleBCMWLAN-42 May 26 2010 22:44:52 AppleBCMWLAN::init: Starting with debug level: 4, debug flags: 00000000 found suitable IOMobileFramebuffer: AppleCLCD display-scale = 2 display-rotation = 0 found PTP interface AppleSynopsysOTGDevice - Configuration: PTP AppleSynopsysOTGDevice         Interface: PTP AppleSynopsysOTGDevice - Configuration: iPod USB Interface AppleSynopsysOTGDevice         Interface: USBAudioControl AppleSynopsysOTGDevice         Interface: USBAudioStreaming AppleSynopsysOTGDevice         Interface: IapOverUsbHid AppleSynopsysOTGDevice - Configuration: PTP + Apple Mobile Device AppleSynopsysOTGDevice         Interface: PTP AppleSynopsysOTGDevice         Interface: AppleUSBMux AppleSynopsysOTGDevice - Configuration: PTP + Apple Mobile Device + Apple USB Ethernet AppleSynopsysOTGDevice         Interface: PTP AppleSynopsysOTGDevice         Interface: AppleUSBMux AppleSynopsysOTGDevice         Interface: AppleUSBEthernet AppleSynopsysOTGDevice::gated_registerFunction Register function USBAudioControl AppleSynopsysOTGDevice::gated_registerFunction Register function USBAudioStreaming IOAccessoryPortUSB::start AppleSynopsysOTGDevice::gated_registerFunction Register function IapOverUsbHid virtual bool AppleUSBDeviceMux::start(IOService*) build: May 26 2010 22:42:28 init_waste AppleSynopsysOTGDevice::gated_registerFunction Register function AppleUSBMux AppleSynopsysOTGDevice::gated_registerFunction Register function AppleUSBEthernet AppleUSBEthernetDevice::start: Device MAC address = 0a:0b:ad:0b:ab:e0 AppleUSBEthernetDevice::start: Host MAC address = 60:33:4b:ea:3d:32 AppleSynopsysOTGDevice::gated_registerFunction Register function PTP AppleSynopsysOTGDevice::gated_registerFunction all functions registered- we are ready to start usb stack AppleS5L8930XUSBPhy::powerUp : with_hsic: 0 AppleEmbeddedUSBArbitrator::enableDeviceClock : enable: 1, index: 0 read new style signature 0x43313131 (line:405) [FTL:MSG] VSVFL Register [OK] [WMR:MSG] Metadata whitening is set in NAND signature [FTL:MSG] VFL Init           [OK] AppleS5L8930XUSBPhy::enableDeviceMode : enable: 1 virtual IOReturn AppleUSBDeviceMux::setProperties(OSObject*) setting debug level to 7 [FTL:MSG] VFL_Open           [OK] [FTL:MSG] YAFTL Register [OK] AppleSynopsysOTGDevice::handleUSBReset yaFTL::YAFTL_Open(l:2730): CXT is not valid. Performing full NAND R/O restore ... close(caller = 0x5695): remote port = 49152 close(caller = 0x5695): remote port = 49154 close(caller = 0x5695): remote port = 49153 close(caller = 0x5695): remote port = 49156 close(caller = 0x5695): remote port = 49157 AppleUSBDeviceMux::handleConnectResult new session 0x83f6b780 established 62078<-lo0->49152 62078<-usb->512 AppleUSBDeviceMux::sessionUpcall socket is closed, session 0x83f6b780 (62078<-lo0->49152 62078<-usb->512) AppleUSBDeviceMux::handleConnectResult new session 0x83f6b580 established 62078<-lo0->49153 62078<-usb->768 AppleUSBDeviceMux::handleConnectResult new session 0x83f6ba00 established 62078<-lo0->49154 62078<-usb->1024 void AppleUSBDeviceMux::handleMuxTCPInput(__mbuf*) received reset, closing 0x83f6ba00 void AppleUSBDeviceMux::handleMuxTCPInput(__mbuf*) received reset, closing 0x83f6b580 AppleUSBDeviceMux::handleConnectResult new session 0x83f6ba00 established 62078<-lo0->49155 62078<-usb->1280 AppleUSBDeviceMux::handleConnectResult new session 0x83f6b580 established 62078<-lo0->49156 62078<-usb->1536 void AppleUSBDeviceMux::handleMuxTCPInput(__mbuf*) received reset, closing 0x83f6b580 AppleUSBDeviceMux::handleConnectResult new session 0x83f6b900 established 62078<-lo0->49157 62078<-usb->1792 void AppleUSBDeviceMux::handleMuxTCPInput(__mbuf*) received reset, closing 0x83f6b900 AppleUSBDeviceMux::handleConnectResult new session 0x83f6b600 established 62078<-lo0->49158 62078<-usb->2048 recv(6, 4) failed: connection closed unable to read message size: -1 could not receive message close(caller = 0x5695): remote port = 49155 close(caller = 0x5695): remote port = 49159 void AppleUSBDeviceMux::handleMuxTCPInput(__mbuf*) received reset, closing 0x83f6ba00 AppleUSBDeviceMux::handleConnectResult new session 0x83f6b900 established 62078<-lo0->49159 62078<-usb->2304 AppleUSBDeviceMux::sessionUpcall socket is closed, session 0x83f6b900 (62078<-lo0->49159 62078<-usb->2304) client protocol version 12 Restore options: SystemPartitionSize           => <CFNumber 0xb05060 [0x1a9d5c]>{value = +1024, type = kCFNumberSInt64Type} entering partition_nand_device device supports boot-from-NAND nand device is already partitioned entering wait_for_storage_device nand status = recover AppleEmbeddedUSBArbitrator::_usbCableTypeNotificationGated : cableType: USBHost AppleS5L8930XUSBArbitrator::handleUSBCableTypeChange : no change in cable-type [FTL:MSG] FTL_Open           [OK] entering format_effaceable_storage effaceable storage is formatted, clearing it effaceable storaged cleared entering check_for_restore_log executing /sbin/fsck_hfs Executing fsck_hfs (version diskdev_cmds-488.1.7~39). executing /sbin/mount restore log does not exist entering create_filesystem_partitions NAND format complete creating encrypted data partition wipe entire partition: 1 (old = 0 new = 1024) block size for /dev/disk0s1: 8192 /sbin/newfs_hfs -s -v System -b 8192 -n a=8192,c=8192,e=8192 /dev/disk0s1 executing /sbin/newfs_hfs Initialized /dev/rdisk0s1 as a 1024 MB HFS Plus volume block size for /dev/disk0s2s1: 8192 /sbin/newfs_hfs -s -v Data -J -P -b 8192 -n a=8192,c=8192,e=8192 /dev/disk0s2s1 executing /sbin/newfs_hfs Initialized /dev/rdisk0s2s1 as a 14 GB HFS Plus volume with a 8192k journal entering restore_images executing /usr/sbin/asr ASR STATUS: start	223	multicast-client ASR: Waiting for connection attempt from server void AppleUSBDeviceMux::handleConnectResult(BulkUSBMuxSession*, errno_t) new session to port 12345 failed: 61 void AppleUSBDeviceMux::handleConnectResult(BulkUSBMuxSession*, errno_t) new session to port 12345 failed: 61 AppleBCMWLAN::handleIOKitBusyWatchdogTimeout: Error, no successful firmware download after 60000 ms!! Giving up... ASR STATUS: setup ASR: Validating target... ASR: done ASR STATUS: metadata ASR: Validating source... AppleUSBDeviceMux::handleConnectResult new session 0x83f6b880 established 12345<-lo0->49162 12345<-usb->3072 ASR: Using Hardware AES ASR: Using Hardware AES ASR: Using Hardware AES ASR: done ASR: Using Hardware AES ASR: Warning: You may not be able to start up a computer with the target volume. ASR: Retrieving scan information...done ASR: Validating sizes... ASR: done ASR STATUS: restore ASR RESTORE PROGRESS: 2% ASR RESTORE PROGRESS: 4% ASR RESTORE PROGRESS: 6% ASR RESTORE PROGRESS: 8% ASR RESTORE PROGRESS: 10% ASR RESTORE PROGRESS: 12% ASR RESTORE PROGRESS: 14% ASR RESTORE PROGRESS: 16% ASR RESTORE PROGRESS: 18% ASR RESTORE PROGRESS: 20% ASR RESTORE PROGRESS: 22% ASR RESTORE PROGRESS: 24% ASR RESTORE PROGRESS: 26% ASR RESTORE PROGRESS: 28% ASR RESTORE PROGRESS: 30% ASR RESTORE PROGRESS: 32% ASR RESTORE PROGRESS: 34% ASR RESTORE PROGRESS: 36% ASR RESTORE PROGRESS: 38% ASR RESTORE PROGRESS: 40% ASR RESTORE PROGRESS: 42% ASR RESTORE PROGRESS: 44% ASR RESTORE PROGRESS: 46% ASR RESTORE PROGRESS: 48% ASR RESTORE PROGRESS: 50% ASR RESTORE PROGRESS: 52% ASR RESTORE PROGRESS: 54% ASR RESTORE PROGRESS: 56% ASR RESTORE PROGRESS: 58% ASR RESTORE PROGRESS: 60% ASR RESTORE PROGRESS: 62% ASR RESTORE PROGRESS: 64% ASR RESTORE PROGRESS: 66% ASR RESTORE PROGRESS: 68% ASR RESTORE PROGRESS: 70% ASR RESTORE PROGRESS: 72% ASR RESTORE PROGRESS: 74% ASR RESTORE PROGRESS: 76% ASR RESTORE PROGRESS: 78% ASR RESTORE PROGRESS: 80% ASR RESTORE PROGRESS: 82% ASR RESTORE PROGRESS: 84% ASR RESTORE PROGRESS: 86% ASR RESTORE PROGRESS: 88% ASR RESTORE PROGRESS: 90% ASR RESTORE PROGRESS: 92% ASR RESTORE PROGRESS: 94% ASR RESTORE PROGRESS: 96% ASR RESTORE PROGRESS: 98% ASR RESTORE PROGRESS: 100% ASR: Copied 995688960 bytes in 76.85 seconds, 12652.70 KiB/s ASR STATUS: verify ASR VERIFY PROGRESS: 2% AppleUSBDeviceMux::sessionUpcall socket is closed, session 0x83f6b880 (12345<-lo0->49162 12345<-usb->3072) ASR VERIFY PROGRESS: 4% ASR VERIFY PROGRESS: 6% ASR VERIFY PROGRESS: 8% ASR VERIFY PROGRESS: 10% ASR VERIFY PROGRESS: 12% ASR VERIFY PROGRESS: 14% ASR VERIFY PROGRESS: 16% ASR VERIFY PROGRESS: 18% ASR VERIFY PROGRESS: 20% ASR VERIFY PROGRESS: 22% ASR VERIFY PROGRESS: 24% ASR VERIFY PROGRESS: 26% ASR VERIFY PROGRESS: 28% ASR VERIFY PROGRESS: 30% ASR VERIFY PROGRESS: 32% ASR VERIFY PROGRESS: 34% ASR VERIFY PROGRESS: 36% ASR VERIFY PROGRESS: 38% ASR VERIFY PROGRESS: 40% ASR VERIFY PROGRESS: 42% ASR VERIFY PROGRESS: 44% ASR VERIFY PROGRESS: 46% ASR VERIFY PROGRESS: 48% ASR VERIFY PROGRESS: 50% ASR VERIFY PROGRESS: 52% ASR VERIFY PROGRESS: 54% ASR VERIFY PROGRESS: 56% ASR VERIFY PROGRESS: 58% ASR VERIFY PROGRESS: 60% ASR VERIFY PROGRESS: 62% ASR VERIFY PROGRESS: 64% ASR VERIFY PROGRESS: 66% ASR VERIFY PROGRESS: 68% ASR VERIFY PROGRESS: 70% ASR VERIFY PROGRESS: 72% ASR VERIFY PROGRESS: 74% ASR VERIFY PROGRESS: 76% ASR VERIFY PROGRESS: 78% ASR VERIFY PROGRESS: 80% ASR VERIFY PROGRESS: 82% ASR VERIFY PROGRESS: 84% ASR VERIFY PROGRESS: 86% ASR VERIFY PROGRESS: 88% ASR VERIFY PROGRESS: 90% ASR VERIFY PROGRESS: 92% ASR VERIFY PROGRESS: 94% ASR VERIFY PROGRESS: 96% ASR VERIFY PROGRESS: 98% ASR VERIFY PROGRESS: 100% ASR: Verified SHA-1 checksum 995688960 bytes in 25.90 seconds, 37539.74 KiB/s ASR STATUS: finish entering mount_filesystems executing /sbin/fsck_hfs Executing fsck_hfs (version diskdev_cmds-488.1.7~39). executing /sbin/mount executing /sbin/fsck_hfs disk0s2s1: ioctl(_IOW,'d',24,4) is unsupported. Executing fsck_hfs (version diskdev_cmds-488.1.7~39). executing /sbin/mount entering install_kernel_cache writing kernelcache to /mnt1/System/Library/Caches/com.apple.kernelcaches/kernelcache entering install_secure_vault_daemon entering get_hardware_platform platform-name = s5l8930x linking /mnt1/usr/sbin/securekeyvaultd to /mnt1/usr/sbin/securekeyvaultd.s5l8930x no securekeyvaultd for s5l8930x entering fixup_var remove_path /mnt1/private/var executing /bin/rm creating directory (owner=0 mode=755) /mnt1/private/var entering modify_fstab entering clear_persistent_boot_args executing /usr/sbin/nvram entering update_NOR entering img3_update_NOR img3_flash_NOR_image: flashing LLB data (length = 0x13999) img3_flash_NOR_image: flashing NOR data (length = 0x2a999) img3_flash_NOR_image: flashing NOR data (length = 0xe9d9) img3_flash_NOR_image: flashing NOR data (length = 0x60d9) img3_flash_NOR_image: flashing NOR data (length = 0x25c19) img3_flash_NOR_image: flashing NOR data (length = 0x2e6d9) img3_flash_NOR_image: flashing NOR data (length = 0x33419) img3_flash_NOR_image: flashing NOR data (length = 0x11919) img3_flash_NOR_image: flashing NOR data (length = 0x10f59) img3_flash_NOR_image: flashing NOR data (length = 0x11259) img3_flash_NOR_image: flashing NOR data (length = 0x13899) img3_flash_NOR_image: flashing NOR data (length = 0x39719) entering create_system_key_bag attempting to create system key bag on /mnt2 booted from secure root: give device keybag access to everyone entering update_gas_gauge_software entering update_baseband performing an ice3 baseband update (with AuthInstall) bbupdater: Using chip information entries from device tree...bbupdater: OK perform_ice3_baseband_update: registering for progress notifications perform_ice3_baseband_update: querying baseband info AppleKeyStore:cp_key_store_action(1) AppleKeyStore:cp_key_store_action(1) bbupdater: [02.00]::: ChipInfo: snum: 0x69EA05E4602049D148CC238D, chipid: 0x50, goldcertid: 0x101, nonce: 0x perform_ice3_baseband_update: requesting rampsi from host perform_ice3_baseband_update: received rampsi data (3702672 bytes) perform_ice3_baseband_update: uploading rampsi bbupdater: Validating parameters...bbupdater: OK bbupdater: !!! bbupdater: [13.-1]::: Exception at :0: - BBUReturnError(1)/7: unable to locate firmware file bbupdater: bbupdater: !!! bbupdater: Exception at :0: - BBUReturnError(1)/7: unable to locate firmware file perform_ice3_baseband_update: baseband failed to boot the rampsi perform_ice3_baseband_update: bbupdater error: Exception at :0: - BBUReturnError(1)/7: unable to locate firmware file
 * /dev/rdisk0s1
 * Checking non-journaled HFS Plus Volume.
 * Detected a case-sensitive volume.
 * Checking extents overflow file.
 * Checking catalog file.
 * Checking multi-linked files.
 * Checking catalog hierarchy.
 * Checking extended attributes file.
 * Checking volume bitmap.
 * Checking volume information.
 * The volume Apex8A293.N90OS appears to be OK.
 * /dev/rdisk0s1
 * Checking non-journaled HFS Plus Volume.
 * Detected a case-sensitive volume.
 * Checking extents overflow file.
 * Checking catalog file.
 * Checking multi-linked files.
 * Checking catalog hierarchy.
 * Checking extended attributes file.
 * Checking volume bitmap.
 * Checking volume information.
 * The volume Apex8A293.N90OS appears to be OK.
 * /dev/rdisk0s2s1
 * Checking Journaled HFS Plus volume.
 * Detected a case-sensitive volume.
 * Checking extents overflow file.
 * Checking catalog file.
 * Checking multi-linked files.
 * Checking catalog hierarchy.
 * Checking extended attributes file.
 * Checking volume bitmap.
 * Checking volume information.
 * The volume Data appears to be OK.

attempting to dump restore log writing log file: /mnt1/restore.log