What about bricking? (or what exactly bricks a device)
Posted by Tyler EarmanJuly 30, 2008So you’ve probably heard about being careful with flashing and such because it can brick your device. And you obviously know that bricking a device renders it unusable. But what exactly causes this brick?
Enter the world of embedded devices. Needless to say, your Tilt (herein called an embedded device) lacks a hard drive, so it needs some sort of involatile memory (id est, memory that does not get erased after power to the memory is cut) to store the OS (firmware) and other persistent data.
Embedded devices now days typically turn to a type of flash memory known as NAND flash, which tends to be a lot smaller and more economically feasible than NOR flash, albeit less resilient. More after the break.
So you may be wondering about where the name flash comes from. Well, a colleague of the creator of flash memory, Mr. Shoki Ariizumi, decided that the erasing procedure looked a lot like the flash of a camera. Flashing is obviously the process of programming a piece of flash memory.
So you may be asking what all of this has to do with bricking your device. Well I’m getting there.
Flash memory works very differently from a hard drive, obviously. For instance, NAND flash does not provide a mechanism for random access of data, it has to be accessed by page. Another example is writing to NAND flash. NAND flash has data written to it and erased from it using the Quantum Tunneling effect (didn’t think Quantum mechanics had much bearing on your everyday life now did you?) which has a tendency to be a fair bit more complicated than passing a magnetic charge to a certain position on a magnetic tray.
Obviously this process has to be controlled. Mostly it’s controlled by integrated circuits (ICs) on the board. However, there must obviously be an input to the controllers while the NAND flash is being programmed. Mostly we use USB or serial (classic flashing interfaces) to accomplish this, but utilizing these components requires that an OS is available in order to communicate with the source machine sending the input and that will send the data onto the controllers to be flashed.
On the AT&T Tilt, the communicating OS is what we know as SPL, which can either be hard or soft. HardSPL is the actual SPL that is flashed onto the NAND flash and runs from this location as well. SoftSPL is basically a version of SPL that runs in the RAM only, which is volatile, meaning if you turn the Tilt off, SoftSPL is lost.
See where I’m going with this?
If you’re flashing HardSPL to your Tilt using SoftSPL, and power is cut to your Tilt, in all likelihood you will brick your device. This is because HardSPL has been erased from the NAND flash and only part of it has been rewritten, and since a portion of the code cannot be used, and because HardSPL functions as the bootstrapper, your device will not boot up.
This process of a broken Bootstrapper is what causes the bricking effect, in that your device will no longer run. You can also no longer try to flash back because there is no OS (firmware) to communicate with a source machine to receive the programming data and push it on to the flash controllers.
There are ways around this obviously. The Tilt in particular is a rather resilient device to flashing (I’ve worked with much pickier), allowing partial interfaces such as MTTY to recover from potentially bricking flashes. However MTTY requires at least a partially usable SPL, if you don’t have this then one must further regress to using a JTAG cable, which is essentially a very low level component that will give you an interface to reflash the ROM firmware to the NAND flash almost directly. However, this requires a specialty component (JTAG cable, which can run over $100 for a buffered version) and also requires disassembling your Tilt and finding the correct positions on the mainboard to tie the cable into.
So I hope I haven’t scared you with the whole flashing jargon and all of the other technical information surrounding flashing. But typically understanding what causes things will qualm some of your fears.