[HD2 General] motoi_bogdan:
i can't figure out for sure if it's hardware or software that's been failing you. Since i'm more experienced with hardware i'll try to figure out a cause should the problem turn out to be hardware based after all.

1. nand memory corruption. the nand memory is made out of individual memory blocks, linked in a matrix mode and controlled by a memory ...controller (pretty logical i guess :p ). NAND memory is organized at a logical level in a way very similar to the classical electromagnetic drives (normal hdd's). I mean, blocks, sectors etc. If a memory sector gets damaged, it will produce something called a "bad" memory block. Again, similar to HDD's. But, different to HDD's where you can remap the memory regions and isolate bad blocks, you cannot do this to a flash chip inside a phone. At least not using standard tools or software. These tests are made only once by the manufacturer when the motherboard itself is being build. So, if your nand memory get's corrupted the phone itself won't "know" it since the individual damaged blocks can't be "marked" as damaged for the software to see and avoid placing data over there.

What happens is that you flash a rom, it may complete to 100% and from the bootloader "point of view" data was written over the flash memory. But when you attempt reading data from the damaged sectors, you'll get either nothing or corrupted readings. A more worse situation is when the boadloader itself resides over the damaged memory areas. If this is the case, even bootloader operations will behave erratic - bootloader lock-ups, freezes, strange screens etc.

I've seen phones with similar behavior that will react just like that. Sometime you can flash them, sometime not and when you flash them, they will stick to some random screen or simply freeze since the OS loading process halted with some random error when the corrupted data was read. I only managed to fix this by means of JTAG, a pretty low level debugging tool that requires a direct interface between the cpu and a pc. A memory diagnostic is loaded into the RAM memory and executes from there, it's purpose being to remap the NAND memory. It cannot be done from inside the NAND memory itself just like you cannot simply format the windows drive on a pc, while still being logged in on windows.

But, it's nasty business, service center kind of business.

2. CPU I/O failure. If you look into my signature here on xda, you'll find a link about hd2's cpu and overheating. That problem can in turn cause your problems - also saw this kind of stuff happening to a hd2. In fact is easier to determine if this is the cause. While i won't repeat myself again about how heat cause dilatation in the chip's soldering and how this affects the cpu operations, you can try a simple test. Place a sd card with some rom on it in the phone then place the phone in a bag, then place the bag in the fridge for about an hour. After that (while still keeping the phone in the bag and in the fridge interior) power on the phone, go to the bootloader and try to flash the rom from the sd card. Let the phone in the fridge during flashing and after it restarts. If you can't load a rom from the sd card, try using usb, the ideea is that the phone must remain as cold as possible during the whole process. Check to see if you notice any improvements - phone booting up, different errors or something different in any way from what you noticed so far. If this is the case, that topic from my signature would describe your problem in more detail. If not, we need to look further.

These should be my main suspects. Try to check #2 and reply with some results. ;)