yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] 77flem:
Hello, i gave followed the first post with my desire gsm rooted with s-off but i'm stuck here:

# /data/flash_image misc /data/mtd0.img

[1] Illegal instruction /data/flash_image misc /data/mtd0.img

Any idea ?

i'm using CM 6.1/alpharev N1 table.
[Desire Android Development] xavierjohn22:
might be flash_image is not in the data folder.

Optionally if you have root access

1. Use Root Explorer (from market or anywhere) : Mount as R/W (Read Write)

2. From SD Card copy flash_image, paste to /data/ folder

3. From SD Card copy your mtd0.img, paste to /data/ folder

4. Run Terminal from Phone and issue the command in post #1

/data/flash_image misc /data/mtd0.img
[Desire Android Development] 77flem:
this is exactly what i have done.
[Desire Android Development] rahul.pillai:
Thank you, Thank you and Thank You OP... fixed my niggling USB problem.....
[Desire Android Development] Dashie84:
My desire got usb bricked, my cid is CID : HTC__001.

I found a misc.img here for my cid, post 18 http://android.modaco.com/content/h...com/309939/usb-brick-rickrolled-b0rked-fixed/

what i must do now?

Please i need my telephone back for work stuff :D and im naab on android
[Desire Android Development] kimozabe:
i still havent fixed my problem :(. Is S-OFF required to unbrick?

i still have S-ON, stock sense rom with 2.2 OTA.
[Desire Android Development] DerDoktore:
...if your ROM isn´t "rooted" you won´t be able to flash the mtd0.img... root your ROM as described before and give your command "su" rights before flashing the mtd0.img....
[Desire Android Development] kimozabe:
ive applied unrevoked 3.2 and su works in terminal, ive done this before flashing.

i need to replace the rom completely with a rooted one? rooting stock sense with the 2.2 ota doesnt cut it?
[Desire Android Development] Dashie84:
i've tried the update.zip from modaco without success, i installed it in clockwork mod recovery without success... my phone its rooted via unrevoked 3.21.

Also if i try to restore my old backup (after wiping the phone) it will unmount my sd and cant connect to the network again until i mount my sd trought fastboot.
[Desire Android Development] DerDoktore:
do u use AmonRA or Clockwork 2.5.0.7...????
[Desire Android Development] kimozabe:
I tried to flash recovery-clockwork-2.5.0.7-bravo with fastboot but it didnt work.

Im completely stuck here and really need advice.

Long story short.

Retail HTC Desire with 2.2 OTA

HBOOT 0.93

unrevoked 3.21 didnt work so i used 3.2

SD and USB brick, sdcard fix worked but USB is still bricked.

Ive tried to flash update.zip from another thread in recovery but still no USB.

Ive tried to flash an edited mtd0.img with flash_image, still no USB.

I can run a RUU to go back to scratch right? Im kind of uncertain what RUU is for my Desire.

EDIT: Downloading RUU_Bravo_HTC_WWE_1.21.405.2_Radio_32.36.00.28U_4.06.00

.02_2_release_126984_signed.exe
[Desire Android Development] DerDoktore:
last suggestion: try after flashing S-Off SPL..... otherwise: no idea....
[Desire Android Development] kimozabe:
Tried to flash S-OFF with Clockwork 2.5.0.7 and it didnt work.

What other method would you suggest?
[Desire Android Development] DerDoktore:
S-Off has to be flashed in fastboot mode... use "QtADB" or any other tool.....
[Desire Android Development] Antubis:
Have a look here.

I had a USB brick and was not rooted anymore, and it flawlessly worked for me.
[Desire Android Development] bobbenedetti:
My rooted s-off Desire unsuccesfully tries to load the Qualcomm CDMA technologies MSM driver when I plug it into the USB port of my Windows 7 computer. Is there any way I can fix this..it seems there are some fastboot commands that will do it, but I can't find them.

Help please
[Desire Android Development] Antubis:
Do you still have a rooted ROM ?

If so, have you read the first post and tried to do what was explained ?

If not, please look here
[Desire Android Development] kimozabe:
Thanks for suggestion but i have tried it and it didnt do it either.

Su already works for me in the Terminal so i suspect i am rooted.

I even tried to run an RUU(latest leaked) booted into fastboot on phone but got an error

saying something like ...too many links bla bla and it let me do an optional ROM upgrade that never starts.

My goal now is to return my phone to "out of the box" state and start the whole process over but this time fix the CID before i use unrevoked.

What methods are there to return the phone to out of the box state except running RUU..exe?
[Desire Android Development] @ngel:
PHEW! :o

Just "bricked" my Desire after 100+ flawless flashes and this thread helped so much: I was able to recovery full functionality at the very firts attempt.

For the records, it was the very first time I issued a AmonRa' recovery nandroid backup (I was a long time ClockworkMod user). Don't know if it is relevant is any way.

Thank you!
[Desire Android Development] bobbenedetti:
Interesting! My phone USB bricked when I did a Clockwork mod nandroid backup. Coincidence? Any other similar experiences?
[Desire Android Development] Uschinator:
I have the same issues! After Doing a Nandroid Backup with Clockworkmod Version 2.5.1.2 i get the USB-Brick! I going back to 2.5.0.7 and try again!
[Desire Android Development] bobbenedetti:
Mine was also with 2.5.1.2. I think I will also roll it back to 2.5.0.7..actually I have found that 2.5.0.1 is more reliable.
[Desire Android Development] kimozabe:
Hello again peeps.

Im still looking for a solution, this thing is driving me nuts. I think i have read all USB Brick related threads on the web now and nothing have worked for me.

I have done as Post 1 numerous of times. Even tried the procedure with update.zip on modacos.

Current state:

Original state before ****ing things up it was stock froyo with the 2.2 OTA.

Ran unrevoked 3.2, got the recovery in bootloader and root, also i got the USB Brick. flash misc mtd0 didnt solve anything, neither did it give me any errors, just a new # in Terminal. Now im sitting on MIUI 11.19 out of boredome and tried flash misc again and this time it gave me "error: device out of space" and complained about a bad sector.

I havent S-OFF:ed yet, is this required?

Is there a way to flash misc with fastboot in windows (yes, fastboot still works when im booted in fastboot(bootloader))

I was told a HTC RUU.exe wont restore misc either.

My way of getting files over to the phone atm is mailing myself and receive the mails on the phone.

I even tried teppics downgrade, exchanged the PB99IMG.zip with 2.29.405.x but adb works very dodgy now and then so that didnt work.

Sitting on Windows 7 x64 if that mathers.

Anyone got another ideas? im up for anything.
[Desire Android Development] Antubis:
S-OFF is not needed since I was not. Is your mtd0.img correctly edited with your device CID ? Flashing any official RUU won't help (I did it, and the only thing I got was to be unrooted...).

Is USB debugging checked on your device ? Until I enabled it, nothing worked in the procedure for me.
[Desire Android Development] kimozabe:
Yeah CID is edited, USB debugging checked

Before i loaded MIUI i didnt get error when trying to flash the mtd0

but i do now, still it didnt work before.
[Desire Android Development] banoncn:
my usb-brick..to bad

why my desire have not /.......shared_prefs/?

now i have not that ..how can i do ?

thanks ..banon
[Desire Android Development] Antubis:
Just forget the .../shared_prefs/ folder and put the files in jackpal.androidterm one or any folder on your device ;)
[Desire Android Development] banoncn:
Antubis .....my god a...i solve..thanks very very very muck

before 10 days .i am unhappy everyday ,be my desire usbbrick...my wife and my dauqhter for bad ...now i am play with my family ..i have a happy heart ...thanks .banon ...before i non-root ...have usbbrick...antubis you are my god ....
[Desire Android Development] Antubis:
I'm only a messenger of XDA Gods ;)
[Desire Android Development] jayk32:
I think i might have the same problem but not to sure :confused: I can't mount the SD card and i can't get passed the splash screen. I'm able to get to fastboot and recovery. This happened to me yesterday just after i did a back up through clock work and i flashed a new rom but installation aborted. I was using USB storage through clock work. Then my laptop could not recognize my device, it told me "Device Unknown" and hence i could not mount sd card. I hope someone understands me and i appreciate any help, Thanks in advance.

Jay :)
[Desire Android Development] Hellas4:
Hello there, can anyone tell me how do i do this 'fastboot oem boot' thing???i m a noob on android and dont know much things. I go into fastboot but dont know what to do next to do this. Please help me!
[Desire Android Development] pilsener69:
Yesterday I had that problem and using the usb method to correct the brick I could make it work again:

If your terminal has the failure of USB-Brick

Mode access FastBoot (BACK + POWER) and writing from the CMD or Terminal:

fastboot-windows.exe oem enableqxdm 0 (if you have Windows)

sudo ./fastboot-linux oem enableqxdm 0 (if you have Linux)

fastboot-mac oem enableqxdm 0 (if you have Mac)

Reboot normally and SD it should work.

Now you can download this file and save shadowchild.nl/fixmisc/update.zip the root of the SD, not rename or anything.

Sign in recovery mode and when the phone shows the triangle press VOLUME UP + POWER and select Apply from sdcard update.zip

Reboot and see if it has been fixed.

Have a nice day :)

My problem is that since then I can not enable bluetooth. I try to connect and after a few seconds off eventually.

Can anyone help me with this problem?
[Desire Android Development] kimozabe:
I cant even flash_image anymore, says i got a bad block or something and error writing misc.

I think i am one of those with a corrupt misc from start or got one when rooted with unrevoked. Im going to reinstall stock rom/ruu and ship it for repair.

If usb was the only brick i could live with it and use a cardreader but battery drains awfully quick and wifi, bt, service signal all is bad atm.
[Desire Android Development] jayk32:
Thanks for helping, but its not working cause my Laptop does not recognize my device. Plus in ADB/SDK it says "error: device not found" I don't know what else to do except take it to the phoneshop and get it repaired or replaced. :(

Edit:- I finally got my phone up and running :D I dont really know how, but its a MIRACLE lol But i still have the USB brick :( But i'm gonna try and sort it, the main thing is i can mount the sd card through recovery. :) Phew!!! LOL
[Desire Android Development] Hellas4:
everything ok until when i do '/data/flash_image misc /data/mtd0.img'

it says '/sbin/sh: /data/flash_image: not found'

everything is in place why it refuses to do it???
[Desire Android Development] kimozabe:
did you "chmod 755 flash_image" ?

need to make it executable.
[Desire Android Development] jayk32:
Thanks mate for ur tip about using Root Explorer, now my phone is FIXED!! YAY :D Also a BIG THANK YOU to all the devs involved!! :cool:
[Desire Android Development] kimozabe:
Finally unBricked thanks to the people on IRC specially Buzmay.

downgrade did the trick.
[Desire Android Development] cybrid3:
Can someone please help me. I currently dont have a rom installed that boots up and without SD functionality I cannot install one. How can I go about fixing my phone? I can get into recovery mode and fastboot but I cannot boot past the splash screen and my SD is not working. Have I got to throw my phone in the bin?

Thanks in advance to anyone who can help
[Desire Android Development] buzmay:
I am glad I was helpful :)
[Desire Android Development] kimozabe:
You need to reactivate SDcard with the help from Fastboot program that comes with Android SDK. Go download it if you havent.

In post #1 there is a command typ to type when you have.

Put phone in fastboot and do the command with the fastboot program that comes with android sdk, in tools dir.
[Desire Android Development] fazlee90:
Guys, Thank you so much. I managed to fix my USB brick.yeahhhhhhhhhhh
[Desire Android Development] cybrid3:
Can someone help me with the misc image as I dont know how to edit the hex

My cid is VIRGI001
[Desire Android Development] Ivanovic:
While doing a nandroid backup (clockworkmod 2.5.0.7) the phone rebooted (i guess the backup operation had finished) the htc logo appeared and then endless loop of bootanimation.

I went into recovery,tried to do a nadroid restore but it said it couldnt mount the sd card.Sth was missing,not quite sure.

I did a full wipe and the phone booted but i cant access my SD card.Phone charges and is able to get adb commands.Tried the command in the very first post of this thread to enable sd access but i get an error INFO[ERR] Command error

Corrupted SD? I dont an adapter to try it in a pc or on another phone :/

EDIT

The command worked when i tried again.Recovering my files!
[Desire Android Development] bmk90:
My problem is the sd-card functionality. I used the fastboot commands to “reactivate“ it, but the card is still not recognized, when the phone ist booted up.

Debugging mode is available...

I'm running auraxtsense 8.0 with s-off (alpharev 1.5 stock table),rooted with unrevoked (ClockworkR 2.5.07)

...

Can someone help?

Thanks!
[Desire Android Development] oMaRcO:
after

/data/flash_image misc /data/mtd0.img

i get errorwriting misc: permission denied

what did i wrong??

nevermind: yesssssssssssssss stupid desire is fixed yehoeeeeeeeee

THNX guys ;)

first i must typ ''su" for superuser permission
[Desire Android Development] lept0n:
Hi Guys!

I have a serious issue and i am unable to get my phone usb func back. I have done the fastboot cmd and the SD card works in recovery but when i boot into the ROM, a message appears telling me"its safe to remove the sd card". I have tried to mount it from the settings, done a number of reboots but it doesnt want to mount in the ROM. How can I transfer the files to the /data partition without the SD card, I am stumped, anyone, please .....
[Desire Android Development] dbolichowski:
Not sure what's wrong withi my Desire.

When I plug it into my PC (Windows 7), It says 'Device not recognized'. I've followed the instructions in the first post and have the same results.

Any ideas?
[Desire Android Development] iemand12:
Does your bluetooth work?
[Desire Android Development] pilsener69:
my bt is dead and also usb from windows (driver fail).

usb only works in fastboot or hboot.
[Desire Android Development] iemand12:
Try this, it worked for me

1. Enable SD Card functionality. Boot your phone in FASTBOOT mode (back + power), and enter this command: 'fastboot oem enableqxdm 0' . This will re-enable your SD card.

2. after enabling usb functionality, install a rom through recovery

3.	Use your modified mtd0.img and flash_image and Place files on sdcard (root)

4.	Download android terminal emulator from market

5.	In terminal type "su"

6.	Type "cat /sdcard/flash_image > /data/data/flash_image"

"cat /sdcard/mtd0.img > /data/data/mtd0.img"

7.	Restart terminal

8.	Type "cd /data/data/"

9.	Type "./flash_image misc mtd0.img"

10.	Normal restart device
[Desire Android Development] fllash:
I found that I didn't need to copy anything to data at all, reducing the amount of steps required.

So pretty much, download the two files previously mentioned mtd0.img and flash_image, and extract them to the root of the SD card.

Then in a terminal emulator in your phone, type the following:

su ('$' should change to '#')

cd /

cd sdcard

flash_image misc mtd0.img

Then reboot.

I tried using the recovery-based job where you can flash it as an update.zip, but it failed to work for me. If that is the case, perhaps give it a shot from within android.
[Desire Android Development] lept0n:
My problem is that I cannot access the sdcard from android whereas it is accessible from recovery, it there a way to manually mount the sdcard from android ? not through the settings...
[Desire Android Development] pilsener69:
thanks, I'll try
[Desire Android Development] lept0n:
Hi,

I tried this procedure but i am still bricked, i can connect to the PC but cannot mount my sdcard in android. Any suggestions ?
[Desire Android Development] stevebrush:
cid generator

just to let you know that I change my server, my cid generator is now located here :

http://ks25738.kimsufi.com/misc

if someone could change the link in first post...

thanks.
[Desire Android Development] iemand12:
I read your previous post and i don't think this fix will work for your device, because my fix only works if you can mount your sdcard in android, terminal needs the sdcard to fix the brick, just make sure you followed the first step in my tutorial correctly, because, that enables the sdcard in android
[Desire Android Development] lept0n:
I managed to transfer mtd0.img and the flash_image from recovery to the system partition via an update.zip, then i ran the flash_image to fix the mtd0. i took the dump after the reboot, it showed the correct CID (HTC__001 in my case). I am able to use adb now during normal boot but it does not mount my sdcard in android, it always says "its safe to remove the sdcard".

One question is in my mind though, i was using app2sd+ on ext3 partition before i bricked my phone so maybe it is causing this problem. I have not been able to delete that partition yet because i dont know how to do it :-) any suggestions?
[Desire Android Development] iemand12:
I use gparted in ubuntu to delete and modify partitions, not sure about the windows alternative though, i've never used it ;)
[Desire Android Development] abz54:
Hi, I bricked my desire while trying to flash a hd rom. I lost total access to the sdcard, ive managed to get the access back and have tried to use this method. I have both the flash image and mtd0.img (created using CID generator) (HTC__001, rom version 2.29.405.2) in the data folder in the phone memory, when i execute /data/flash_image misc /data/mtd0.img with su i get an error "mtd: read all-zero block at 0x00000000; skipping error reading /data/mtd0.img"

I also have another problem where by the phone is charging very slowly and is only recognising charging as usb even when plugged into the mains. dont know if they are linked.

Anyone know what the issue is?

EDIT: Solved, thanks
[Desire Android Development] papabol:
how to do issue "fastboot oem enableqxdm 0" where should i type it? is it on the phone or to the pc?
[Desire Android Development] abz54:
"how to do issue "fastboot oem enableqxdm 0" where should i type it? is it on the phone or to the pc?"

through your pc's command system
[Desire Android Development] papabol:
i reformat my sd card using card reader hoping to fix it but when i inserted it to my phone it just the HTC logo will appear and then restarting..

its like this.. http://www.youtube.com/watch?v=4AjVZ7vglRg

you mean here?

i only get error..

please help! :(
[Desire Android Development] Pajorve:
A little help in a mini tutorial

Friend ... do the following:

You need to download the Android SDK and extract it in the folder c:/from your PC

Now go to the location you extracted and rename the file to Androidsdk

And your Desire go

application development settings > >

and select the option USB Debugging

Now plug your Desire on your computer and then open the command prompt, type cmd

Type the following command:

cd \

cd androidsdk\tools\

adb devices

fastboot oem enableqxdm 0

Now you will withdraw its Desire of the USB cable to see if he really the function of the SD Card.

Afterwards between Internet Desire, enter the address of the link below:

http://www. shadowchild. nl/fixmisc/update. zip (remove spaces)

It will download the file UPDATE.ZIP for Desire within the download folder on your SD card (Leave it there for now, don't do anything with this file)

Now you will need to download and install the application Root Explorer link below also over the Internet of Desire:

http://www. 4shared.com/file/TZ_dhyv8/Root_Explorer _ v2122 .html (REMOVE SPACES)

Done it and application Root Explorer installed, open Explorer and go to Root:

sdcard/download/update.zip

Press your finger on the file and choose copy.

With the return arrow, navigate again, returning to sdcard and paste the file update zip at the root of the card.

BECAUSE YOU NEED TO DO THIS PROCEDURE?

Because when. you're flashear update.zip file and it is within the download folder, simply give error because it will not be

found.

The file needs to be in the root.

Now a very important step of all: procedure

You'll flashear UPDATE.ZIP file to have the return of USB and thus terminate the procedures with total success!!!

You will need to enter Recovery mode to the next step.

Turn off your cell phone

With volume down keys and power between on-screen Hboot

With the volume down key, choose the RECOVERY mode and with the power key to confirm and wait for the black screen with the red triangle in the middle.

This is done you will enter recovery mode, blue pressing volume up and power together.

Navigate to the Wipe option date/factory reset (wait finish)

Navigate now till option Wipe cache partition (wait finish)

And finally the most important:

Navigate to the option "Apply sdcard: update.zip"

Select the file and send apply, wait to finish and ready!

Now go to Reboot System now and press Power again.

Wait for Desire connect normally.

Now is the time of "LET'S SEE":

Reconnect your Desire in the USB cable from the PC ...

At this point it starts to be recognized by PC and all drivers are being installed again.

You will face of silly and not believing ... hehehhe

Ready all finished and VC happy!

Now simply access normally your folders SD card via USB!

I hope you have really helped and please post the result!

;);)
[Desire Android Development] w0mbat:
******* Now sorted, used update.zip method from Modaco and all worked fine :) **********

Hi, created my img file using the online cid generator and put it in /data as the instructions say.

When I run it I see the following error :)

export PATH=/data/local/bin:$PATH

$ $su -

# /data/flash_image misc /data/mtd0.img

mtd: read error at 0x00000000 (Out of memory)

mtd: read error at 0x00020000 (Out of memory)

mtd: read error at 0x00040000 (Out of memory)

mtd: read error at 0x00060000 (Out of memory)

mtd: read error at 0x00080000 (Out of memory)

mtd: write error at 0x00000000 (Out of memory)

mtd: re-read error at 0x00000000 (Out of memory)

mtd: write error at 0x00000000 (Out of memory)

mtd: re-read error at 0x00000000 (Out of memory)

mtd: skipping write block at 0x00000000

mtd: write error at 0x00020000 (Out of memory)

mtd: re-read error at 0x00020000 (Out of memory)

mtd: write error at 0x00020000 (Out of memory)

mtd: re-read error at 0x00020000 (Out of memory)

mtd: skipping write block at 0x00020000

mtd: write error at 0x00040000 (Out of memory)

mtd: re-read error at 0x00040000 (Out of memory)

mtd: write error at 0x00040000 (Out of memory)

mtd: re-read error at 0x00040000 (Out of memory)

mtd: skipping write block at 0x00040000

mtd: write error at 0x00060000 (Out of memory)

mtd: re-read error at 0x00060000 (Out of memory)

mtd: write error at 0x00060000 (Out of memory)

mtd: re-read error at 0x00060000 (Out of memory)

mtd: skipping write block at 0x00060000

mtd: write error at 0x00080000 (Out of memory)

mtd: re-read error at 0x00080000 (Out of memory)

mtd: write error at 0x00080000 (Out of memory)

mtd: re-read error at 0x00080000 (Out of memory)

mtd: skipping write block at 0x00080000

error writing misc: No space left on device

#

Any ideas? Is it the .img file? Could it be corrupt?

***update*** Actually I have checked the img file with hexedit and it all looks fine so not corrupt.....

Can I use any .img file for my CID? (HTC__001) I see there is one on modaco but I have a different radio version from that guy.......

Cheers,

Neil
[Desire Android Development] papabol:
@Pajorve

I love you man!! :D

IT WORKS! AT LAST MY PHONE IS FULLY FUNCTIONING AGAIN! :D

Thank you very much my friend! :)