[G2 and Desire Z Q&A, Help & Troubleshooting] CollegeBound1987:
Okay so i have been looking all over the forums for help with my issue for the last like 6 hours and i have found stuff that is relevant but i have a weird twist.

I was installing google voice on the latest miui build for the t-mobile G2 and the device froze soo I restarted it causing this nightmare to begin.

I can not get back into android the phone freezes on the HTC screen, however i can get into fastboot which I can then use to get into clockworkmod recovery. At that point however I run into a problem, clockworkmod recovery can't mount anything including my SD card. I tried reformatting the card in clockworkmod and outside of it and no go. My device is S-OFF and when its in fastboot i can connect it to my computer and execute fastboot commands but i don't have a nandroid backup to recover the img files from for a manual reinstall from fastboot.

Any information i can give you to help i will try to get and if i am confused about something please correct me I am kinda new to all of this so I could very easily be confused about something.

[Solution]

Yay I fixed it! Well kinda... I figured out a work around for the emmc problem using an SD card to take its place.

Okay so the break down of the problem was that my phone would not boot into android but i still had clockworkmod and fast boot. When I went into clockworkmod I got the cache errors and it couldnt mount anything including my SD card. If i adb into the device from clockworkmod and typed:

cd ls /dev/block/

i got this if i didnt have an sdcard

loop0 loop2 loop4 loop6 platform

loop1 loop3 loop5 loop7

and when i did have one in i got this

loop0 loop2 loop4 loop6 mmcblk0 platform

loop1 loop3 loop5 loop7 mmcblk0p1

~ # cat /proc/kmsg | grep mmc0

came up with this

<3>[ 4.155456] mmc0: No card detect facilities available

<6>[ 4.156005] mmc0: Qualcomm MSM SDCC at 0x00000000a0500000 irq 98,0 dma 7

<6>[ 4.156280] mmc0: Platform slot type: MMC

<6>[ 4.156402] mmc0: 4 bit data mode disabled

<6>[ 4.156646] mmc0: 8 bit data mode enabled

<6>[ 4.156799] mmc0: MMC clock 144000 -> 50000000 Hz, PCLK 96000000 Hz

<6>[ 4.157043] mmc0: Slot eject status = 0

<6>[ 4.157165] mmc0: Power save feature enable = 1

<6>[ 4.157318] mmc0: DM non-cached buffer at ffa0c000, dma_addr 0x2ae95000

<6>[ 4.157562] mmc0: DM cmd busaddr 0x2ae95000, cmdptr busaddr 0x2ae95300

<3>[ 4.279235] mmc0: error -110 whilst initialising MMC card

and i was basically told that the eMMC went was busted and i was screwed but then i found this: http://tjworld.net/wiki/Android/HTC/Vision/LinuxAnalysis

Its basically a break down of the partition tables of the eMMC and when i saw that the block name for the eMMC was the same as what my SD card was showing up as in the /dev/block directory i decided to attempt to recreate the partition table for the eMMC on my SD card and see if i could use it as a eMMC replacement

So i went back into the device with adb typed 'fdisk /dev/block/mmcblk0' deleted the current partition and started to recreate the partition tables on my sd card exactly like they were on the eMMC. My SDCard partition table looks like this:

Disk /dev/block/mmcblk0: 7948 MB, 7948206080 bytes

4 heads, 16 sectors/track, 242560 cylinders

Units = cylinders of 64 * 512 = 32768 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 16 500 4d Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 16 18 64 45 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 18 159 4500 46 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 159 242560 7756840+ 5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 159 1097 30000 49 Unknown
/dev/block/mmcblk0p6 1097 1487 12500 50 Unknown
/dev/block/mmcblk0p7 1488 1552 2048 51 Unknown
/dev/block/mmcblk0p8 1552 1648 3072 52 Unknown
/dev/block/mmcblk0p9 1648 1712 2048 53 Unknown
/dev/block/mmcblk0p10 1712 1744 1024 54 Unknown
/dev/block/mmcblk0p11 1744 1776 1024 56 Unknown
/dev/block/mmcblk0p12 1776 2050 8751+ 55 Unknown
/dev/block/mmcblk0p13 2050 2146 3072 4a Unknown
/dev/block/mmcblk0p14 2146 2242 3072 4b Unknown
/dev/block/mmcblk0p15 2242 2274 1024 74 Unknown
/dev/block/mmcblk0p16 2274 2554 8957+ 75 Unknown
/dev/block/mmcblk0p17 2554 2562 256 76 Unknown
/dev/block/mmcblk0p18 2563 2595 1024 47 Unknown
/dev/block/mmcblk0p19 2595 2627 1024 34 Unknown
/dev/block/mmcblk0p20 2627 2667 1280 36 Unknown
/dev/block/mmcblk0p21 2667 2939 8701 71 Unknown
/dev/block/mmcblk0p22 2939 3067 4096 48 Unknown
/dev/block/mmcblk0p23 3067 3075 256 73 Unknown
/dev/block/mmcblk0p24 3076 3084 256 31 Unknown
/dev/block/mmcblk0p25 3084 16388 425726+ 83 Linux
/dev/block/mmcblk0p26 16388 58948 1361920+ 83 Linux
/dev/block/mmcblk0p27 58948 65502 209715+ 83 Linux
/dev/block/mmcblk0p28 65502 66142 20480 19 Unknown

Then I ran the following commands:

mke2fs /dev/block/mmcblk0p25

mke2fs /dev/block/mmcblk0p26

mke2fs /dev/block/mmcblk0p27

at this point i was able to mount the system, cache, and data directories from clockworkmod which was all good but i didnt have any android rom installed on any of these directories and at this point my sd card was being used as the main drive for the phone so clockworkmod couldnt mount it and i had no way to load a rom from it...

Soo... back into adb and i ran 'fdisk /dev/block/mmcblk0' and added another partion to the table that was 1gb in size and marked as fat32. Then on my computer made an image an sd card pushed it to the device and ran 'dd if=/data/sdcard.img of=/dev/block/mmcblk0p29' then 'mount /dev/block/mmcblk0p29 /sdcard' and wala clockworkmod detects the SD Card partition. I pushed down the cyanogenmod rom to the now mounted SD Card partition go to clockworkmod and install the zip file from there and reboot the device.

The end result is that my phone doesnt recognize that there is an SD Card pluged in because its using it as if it was the eMMC but it works! im back up and running again!

I know this is all jumbled when i get more time i will go through and try to clean it up and make the instructions a little more straight forward but i hope this helps some of you out there with bricked G2s... apparently it is possible to use your sdcard as a eMMC replacement