Tuesday 29 November 2011

DFU mode for beginners

What is DFU mode?
Device Firmware Update (DFU) mode is a special failsafe mode which Apple has built into all of their devices so that they can restored to a stock iOS firmware regardless of the state they may be in. It is implemented at a lower level than the normal recovery mode, which shows the "connect to iTunes cable" graphic on the screen of the iPhone. DFU mode by contrast has a completely blank screen so there is no way to tell you are in DFU mode by looking at the device.

What's the difference between DFU and normal recovery mode?
When your iPhone is in normal recovery mode you will see a graphic like this...


(remember, if you see this picture you are NOT in DFU mode)



DFU mode by contrast is working at a lower level in the bootloader environment, which happens without any interaction with iOS. This is the very reason DFU mode saves us from a corrupted firmware, because it is not a part of the iOS firmware at all. As already stated, when you are in DFU mode the screen stays blank.

When iTunes communicates with the a device in normal recovery mode it it may not find things quite as it expects if you are jailbroken. It is for this reason (and probably quite a few others) that using recovery mode will invariably fail if you are trying to update or restore a jailbroken iPhone resulting in a rather cryptic iTunes error.
In DFU mode the firmware is irrelevant and the restore will always succeed (assuming there is not a hardware fault). It basically wipes the storage and installs a fresh iOS regardless of what is there already.

DFU Mode is the reason it is it is impossible to brick your iPhone through software.

When do I use DFU mode?
There are several scenarios when you will need to use DFU mode, some of which may be:

1. If you have to upgrade or restore a jailbroken iPhone
2. If you have to downgrade iOS using SHSH Blobs
3. If iOS becomes corrupt or stuck in a loop for whatever reason
4. During the jailbreak process to enable a pwnd DFU state and then apply the payload / custom firmware

So I can use DFU mode to downgrade to any firmware I like?
Yes, BUT have you heard about SHSH Blobs? Using DFU mode does not and cannot bypass Apple's firmware signing security model. If you want to install an old version of iOS you MUST have saved SHSH Blobs for the version and device you want to install it on.

How do you activate DFU mode?
In order to put your device into DFU mode, with the iPhone connected to your computer and turned on or off (it doesn't matter), you must press the "home" and "power" buttons together for EXACTLY 10 seconds at which point you must release "power" but continue to hold "home". After about 15 seconds, the device will enter DFU mode.

There is no way to tell from the screen that this has happened as it will remain blank. If you see the Apple logo, the "connect to iTunes" graphic, or anything but a blank screen, you got the timing wrong. You can just try again until you get it right. It is perfectly normal for the iPhone to reset just before the 7 second mark. Do not be put off by this. The timing of your button release must be exactly 10 seconds. It is best not to even look at the screen! You may like to try using your watch or a clock to get the timing precise. Hold both buttons, count to 10 seconds exactly, release the power button but keep holding home. Simple!

A slightly alternative method which you may prefer (this is the one I use), is to hold both buttons until the iPhone resets (screen turns black) then count to 3 (and a bit!) and release the "power" button. This is exactly the same timing as the first method, it's just your trigger point to start counting is 7 seconds into the process when the reset occurs.

If everything went to plan iTunes should now recognise a device in recovery mode and prompt you to restore it.

On Windows, it may take a few seconds to install DFU mode device drivers if this is the first time you have used it. DO NOT interrupt the process. Otherwise iTunes will never recognise the device and you'll have to do a bit of maintenance in the control panel to get things working. If this happens, try plugging the iPhone into a different USB slot, but have patience!

1 comments:

Thanks for your share. I tried several times to enter DFU mode, but failed ever. However, I made it with the help of your tips and I recoverred my deleted data successfully.

Post a Comment