Once an iPhone is put into Recovery Mode, it will be stuck in the Recovery Mode Loop (when the device restarts it'll automatically go back into Recovery Mode).
To get an iPhone out of the Recovery Mode Loop, download the cross-platform iRecovery utility from ihackintosh.com. The instructions below are for using the command-line Macintosh version of iRecovery, but there's also a Windows version included in the download.
Open a new Terminal window and navigate to the directory that the iRecovery for Mac utility was extracted to.
Connect the iPhone to your Mac with the USB cable, wait for iTunes to finish any synchronization, then enter the command below to open a Terminal interface to the device:
You will see output similar to this:
iRecovery - Recovery Utility by westbaer Thanks to pod2g, tom3q, planetbeing and geohot. ======================================= :: :: iBoot for m68ap, Copyright 2008, Apple Inc. :: :: BUILD_TAG: iBoot-385.49 :: :: BUILD_STYLE: RELEASE :: ======================================= [FTL:MSG] Apple NAND Driver (AND) RO [NAND] Device ID 0xb614d5ec [NAND] BANKS_TOTAL 4 [NAND] BLOCKS_PER_BANK 4096 [NAND] PAGES_PER_BANK 524288 [NAND]SECTORS_PER_PAGE 8 [NAND] BYTES_PER_SPARE 128 [FTL:MSG] FIL_Init [OK] [FTL:MSG] BUF_Init [OK] [FTL:MSG] FPart Init [OK] read old style signature 0x43303034 (line:286) [FTL:MSG] VFL Register [OK] [FTL:MSG] VFL Init [OK] [FTL:MSG] VFL_Open [OK] [FTL:MSG] FTL Register [OK] [FTL:MSG] FTL_Open [OK] Boot Failure Count: 2 Panic Fail Count: 0 Entering recovery mode, starting command prompt ]
Next, enter these commands in the device's Terminal interface:
setenv auto-boot true saveenv /exit
... then reboot the iPhone by holding down the Sleep / Wake and Home buttons for 10 seconds.