[HOW-TO]fix sdcard mount/read and usb not working on hero

Search This thread

SANSYF

Senior Member
Apr 15, 2012
50
29
Next time, our hero know an update to the recovery 5.x , and people say they've got problem with sdcard.
Problem don't come from the "sdcard slot", No !! Its come from a wrong CID.

FIRST YOU NEED A WORKING ANDROID SDK WITH ADB

TO FIX IT, You need to do these step:

1/Download attached files ( mtd0.img and flash_image.zip: extract flash _image from flash_image.zip). Push these file on sdcard with an sdcard reader for computer.
2/Go to the bootloader (press down-volume key and power-on key)
3/Press back to switch on fastboot mode
4/Connect your device to the computer and open terminal
5/Write:
Code:
adb devices
fastboot oem enableqxdm 0
fastboot reboot

NOW sdcard is fix
:D

6/Exit fastboot and disconnect usb
7/Switch on your phone
8/With root explorer push mtd0.img and flash_image to /data/
9/Open android terminal emulator and write
Code:
su
chmod 755 /data/flash_image
/data/flash_image misc /data/mtd0.img
reboot

Terminal should gives an ERROR (no fear, it's normal)


NOW usb work
:good:
 

Attachments

  • mtd0.img
    640 KB · Views: 281
  • flash_image.zip
    5.3 KB · Views: 279
Last edited:

ralph745

Senior Member
Mar 3, 2012
62
12
Not work when i type in terminal /data/flash_image misc /data/mtd0.img it show error say not have space on phone although there is nothing installed.I ****ed up phone with that recovery so i can just drop him in trash........
 

jdwis

Senior Member
Feb 18, 2010
151
9
Next time, our hero know an update to the recovery 5.x , and people say they've got problem with sdcard.
Problem don't come from the "sdcard slot", No !! Its come from a wrong CID.

FIRST YOU NEED A WORKING ANDROID SDK WITH ADB

TO FIX IT, You need to do these step:

1/Download attached files ( mtd0.img and flash_image.zip: extract flash _image from flash_image.zip). Push these file on sdcard with an sdcard reader for computer.
2/Go to the bootloader (press down-volume key and power-on key)
3/Press back to switch on fastboot mode
4/Connect your device to the computer and open terminal
5/Write:
Code:
adb devices
fastboot oem enableqxdm 0
fastboot reboot

NOW sdcard is fix
:D

6/Exit fastboot and disconnect usb
7/Switch on your phone
8/With root explorer push mtd0.img and flash_image to /data/
9/Open android terminal emulator and write
Code:
su
chmod 755 /data/flash_image
/data/flash_image misc /data/mtd0.img
reboot

NOW usb work :good:

Hi
I tried this commands
"adb devices" - will not show anything
as in fastboot it showed me the device i took chance to run following command-
"fastboot oem enableqxdm 0"
it showed ...OKAY
then "fastboot reboot" but it dodnt boot, so i pressed the menu and took the cable out.
restarted the phone but it still cant take sdcard as my ROM is messed up, its stuck on "sense process error" so cant go beyond.
 

jdwis

Senior Member
Feb 18, 2010
151
9
Next time, our hero know an update to the recovery 5.x , and people say they've got problem with sdcard.
Problem don't come from the "sdcard slot", No !! Its come from a wrong CID.

FIRST YOU NEED A WORKING ANDROID SDK WITH ADB

TO FIX IT, You need to do these step:

1/Download attached files ( mtd0.img and flash_image.zip: extract flash _image from flash_image.zip). Push these file on sdcard with an sdcard reader for computer.
2/Go to the bootloader (press down-volume key and power-on key)
3/Press back to switch on fastboot mode
4/Connect your device to the computer and open terminal
5/Write:
Code:
adb devices
fastboot oem enableqxdm 0
fastboot reboot

NOW sdcard is fix
:D

6/Exit fastboot and disconnect usb
7/Switch on your phone
8/With root explorer push mtd0.img and flash_image to /data/
9/Open android terminal emulator and write
Code:
su
chmod 755 /data/flash_image
/data/flash_image misc /data/mtd0.img
reboot

NOW usb work :good:

I have managed to get upto this stage and when I give this command -
/data/flash_image misc /data/mtd0.img
it gives me "error writing misc: No space left on device"

I tried again and it gave me -
"mtd: read all-zero block at 0x00000000; skipping
error writing misc: No space left on device"

I am sure there is enough space, my card is 8GB and atleast 3GB is left though
what do i do now?
 
Last edited:

SANSYF

Senior Member
Apr 15, 2012
50
29
I have managed to get upto this stage and when I give this command -
/data/flash_image misc /data/mtd0.img
it gives me "error writing misc: No space left on device"

I tried again and it gave me -
"mtd: read all-zero block at 0x00000000; skipping
error writing misc: No space left on device"

I am sure there is enough space, my card is 8GB and atleast 3GB is left though
what do i do now?

If it gives this sentence, your sdcard and usb-mount are fixed
 
  • Like
Reactions: jdwis

jdwis

Senior Member
Feb 18, 2010
151
9
If it gives this sentence, your sdcard and usb-mount are fixed

Cheers man!!! thanks a zillion... its sorted now... u r genius...
Just wondering what is that "misc" do, the reason is I know just a little bit of Linux not much so I guess your explaining would help me alot..

thanks again my friend.
 

SANSYF

Senior Member
Apr 15, 2012
50
29
Cheers man!!! thanks a zillion... its sorted now... u r genius...
Just wondering what is that "misc" do, the reason is I know just a little bit of Linux not much so I guess your explaining would help me alot..

thanks again my friend.

For code line, I am inspired from an other htc device where has the same issue..
I imagine the new recovery has an effect on device information and corrupt sd-card functionality
So I have think "If I re-write devices informations, what it do ?"
In first, I make sdcard readable by the device( "fastboot commands" )
Next I have edited mtd0.img with an hex-editor ( it contain CID and device information)
And flash mtd0.img ( "misc" is a folder where you flash the img)

I have seen, if you flash an old cwm recovery, probleme come back ( but you can fix it with my tuto)
 

jdwis

Senior Member
Feb 18, 2010
151
9
For code line, I am inspired from an other htc device where has the same issue..
I imagine the new recovery has an effect on device information and corrupt sd-card functionality
So I have think "If I re-write devices informations, what it do ?"
In first, I make sdcard readable by the device( "fastboot commands" )
Next I have edited mtd0.img with an hex-editor ( it contain CID and device information)
And flash mtd0.img ( "misc" is a folder where you flash the img)

I have seen, if you flash an old cwm recovery, probleme come back ( but you can fix it with my tuto)

Good one, now I got the problem again without any stupidity from myside like removing cable while sdcard is mounted.. nothing as such I have done now.

After your tutorial everything started working.
As to make everything work since yesterday and for so many hours the battery was discharging and charging, installing several ROMs to get access etc etc..

As everything was working, I thought to fully charge the battery and wipe battery info from recovery. I had RA 1.7.... then had installed CWM5.xx then installed CWM 2.5xx and then finally got back my RA 1.7 as I had my backup taken by that...
Went into RA recovery, wiped info for battery, came out and the ROM shows "Removed SDcard" - and the whole problem came back... (i was going to work)

Came back from work, quickly did your tuto, things started working again, wanted to make sure is it recovery or was somehting else.. so went back into recovery and went into "Wipe"... then DID NOTHING, I mean it, I didnt execute any other thing in there... came out and same problem "Removed sdcard" on the ROM...

what is going on with this, how can I stop this?
Do you think you would need any info from my phone I will give you, where you could possibly make some specific image for this phone or .... I dont know man... cant think of anything as I am not as clever as you my friend... please help..
 

SANSYF

Senior Member
Apr 15, 2012
50
29
I have seen problem come when we change the recovery. If you fix it with amonra recovery, it doesn't come back but when we flash an other recovery, sometime problem come
 

jdwis

Senior Member
Feb 18, 2010
151
9
I have seen problem come when we change the recovery. If you fix it with amonra recovery, it doesn't come back but when we flash an other recovery, sometime problem come

Ya but I am not changing the recovery, RA is there now, I am just going into recovery's Wipe menu, doing nothing I come out and I have this problem come back..

I think my whole phone tihng has gone corrupt, do you think if I do RUU it will wipe everything, I mean even HBOOT & recovery etc... and that RUU will put original HBOOT image, recovery and stock rom (unrroted) back on phone?
 

SANSYF

Senior Member
Apr 15, 2012
50
29
Ya but I am not changing the recovery, RA is there now, I am just going into recovery's Wipe menu, doing nothing I come out and I have this problem come back..

I think my whole phone tihng has gone corrupt, do you think if I do RUU it will wipe everything, I mean even HBOOT & recovery etc... and that RUU will put original HBOOT image, recovery and stock rom (unrroted) back on phone?

You can try, be sure usb and sdcard are fixed before doing it. If it work post some feedbacks please ;)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I have managed to get upto this stage and when I give this command -
    /data/flash_image misc /data/mtd0.img
    it gives me "error writing misc: No space left on device"

    I tried again and it gave me -
    "mtd: read all-zero block at 0x00000000; skipping
    error writing misc: No space left on device"

    I am sure there is enough space, my card is 8GB and atleast 3GB is left though
    what do i do now?

    If it gives this sentence, your sdcard and usb-mount are fixed