Tim Hentenaar's Blog

May 30, 2011 09:05

iPhone 3G NOR Restore

I recently solved a painful dilemma with an iPhone 3G. For the fun of it, after installing OpeniBoot and backing up the NOR, I thought it would be fun to randomly corrupt the NOR and see what happened. :-P

Well, what happened isn't unimaginable. The phone would only boot into DFU mode. Ironically, iTunes would put the phone in WTF mode, but the payload it sent immediately afterward was ineffective (16xx error from iTunes)!

Here's how I restored my NOR backup:

  1. Use iReb to put the device into WTF mode (Yes, I linked to a .NET app. Lord, help us all...)

  2. Use iRecovery to upload and execute a "pwned iBSS" (i.e. from a custom restore.) The screen will turn white if this is successful.

    root# irecovery -x iBSS.n82ap.RELEASE.dfu

  3. Use loadibec to upload and execute openiboot

    root# loadibec openiboot.img3

  4. Launch oibc, and restore the NOR

    root# oibc
    nor_write 0x09000000 0 1048576

Now, the iPhone would boot precisely as it did before installing OpeniBoot. To return the phone to normal operation, I simply did a DFU restore via iTunes to a custom 4.1.2 ipsw. It's a painful reminder of what its like to try to use an iDevice in an unorthodox manner, or cause a catastrophic failure. It also reinforces my decision to migrate from the iPhone to an Android phone over a year ago. I'd hate to think of how much an exchange at the Apple Store would have set me back in such a case. :-P