[G2 and Desire Z Q&A, Help & Troubleshooting] mops81:
Hello.

Normally Im able to fix any issues just by searching and reading, but I'm not able to find answers to what I'm looking for. I have a HTC Desire Z, bough in Hong Kong. Also I'd like to point out that only recently I started exploring android system, however I am relatively knowledgeable around linux and PC's in general.

Phone has been working fine for nearly 3 years (running factory 2.2 and then 2.3 ROMs only - no root or other hacks - completly factory). In recent months my phone has been crashing more and more often to the point that it would freeze or crash several times a day and was barely usable. I decided to do format it and put some custom rom on it. I used guides on this forums to root and install 4ext (also tried CW). I tried few roms, some would not boot at all (stuck on boot screen), some would boot but also crash. Upon further investigation I believe the internal storage on the phone is damaged/corrupted. I did format the partitions several times to no avail. I have fun e2fsck, which sometimes shows bad block, sometimes not....

To prove that internal storage is corrupted, I do the following. Boot to 4ext, using adb I mount internal /data partition. I copy a large file from sdcard to /data partition. Once the /data is about 30-40% full, copy will fail with different error messages - segmentation fault, unable to write, and some other random ones. Then /data is inaccessible until i reboot and mount it again. I can format and repeat the procedure - same result. Same applies to /system partition, with the exception that it is about first 90% ok and only last 10% is damaged (will result in error if I try to copy data there)

Oddly enough, factory 2.2 rom works to some extent - because it's small and makes minimal use of /data (about 70MB), It will boot and essentially phone will work for a short while, as long as there's no need for using data partition - restoring sms messages or contacts would fail before completed, etc. Eventually it will crash once, twice, and eventually wont boot at all.

Anyway, I'm looking for answers for following questions:

1. e2fsck application that comes with 4ext and CWM does not actually perform check for bad blocks. It says it does, but it doesn't - it happens too quick. I think what it does is that it only verifies existing bad blocks. There should be another binary that comes with it called "badblocks". This executable does that actual write/read search of bad blocks, but this is not included. According to documentation of e2fsck theres a special parameter to force write/read badbblock detection of entire disk, but the e2fsck version does not support it. It appears that the "android" version of e2fsck is cut down and not the same as linux version. Is there a way to perform a proper bad block search on android ?

2. better solution would be to completely change ROM to use sdcard storage only, and do not use /system.or /data partitions at all (/dev/block/mmcblk0p25 and /dev/block/mmcblk0p26), and create those partitions on sdcard. knowing linux I'm pretty sure this is entirely possible, however I do not know how much work is involved to phone, boot partition and rom - I'm also not too familiar with android limitations. I cant find any related information, but maybe somebody can point me in the right direction ?

3. any other possibilities to make any use of this phone ? It's still a good phone, good screen, works fine, etc, its just that internal memory is corrupted hence the thing is useless at the moment.

Note this is the internal memory that is corrupted, not the SDcard.

Thanks in advance,