[DEV] USB-BRICK FIX - Restore USB function on your bricked Desire

Search This thread

GhostSoldier

Member
May 27, 2010
30
0
Stockholm
www.jesperjarl.se
I rather learn how I do it in terminal. I did a search for mac-based explorer but didnt find much.

Could you point me to a thread or some tips?

I have never moved files before using terminal so basically I need to know how I can get my phones name/adress and point the files to a specific folder on that adress.

Thanks again guys!
 

The Professor

Senior Member
Jan 23, 2008
271
6
You can't do it from an external terminal unless you're not already bricked. You have to do it from a terminal app inside the Android OS or by using root explorer.
 

The Professor

Senior Member
Jan 23, 2008
271
6
mv /sdcard/flash_image /data
mv /sdcard/mtd0.img /data

Then

cd /data
ls

And make sure that directory has those two files in it.

Then

/data/flash_image misc /data/mtd0.img

Replacing mtd0.img with whatever your image is titled wherever it occurs.
 

MojUk

Senior Member
Sep 22, 2009
228
7
South West
Hey guys, this is great news! Much respect to the devs behind this :D

I only got my Desire yesterday after having a Hero before (rooted up to the max :D) My initial impression from spending aaaaages reading on here and modaco is one of confusion, i may have the wrong end of the stick and become uber confused after reading quite literally hundreds of pages lol!

<confusion>

This 'bricking' issue (now solved) is caused when entering 'usb' mode whilst in recovery when you are attempting to flash a new rom not when initially 'rooting' the device? But 'rooting' a Desire isn't the same as 'rooting' a Hero as you don't have same kind of low level access on newer HTC devices as you did on the G1, Magic, Hero etc?

</Confusion>
 

Gooner4_1998

Senior Member
Dec 12, 2009
104
0
Re: [USB-BRICK FIX]Restore USB function on your bricked Desire

Having read the info over at Modaco I want to pull the misc.img file off my rooted but non bricked phone as a back up. Am using connectbot and running the required command I.e.
cat /dev/mtd/mtd0 < /sdcard/misc.img but I keep getting "no such file" back.

What am I doing wrong?

Thanks!
-------------------------------------
Sent from my HTC Desire
 

The Professor

Senior Member
Jan 23, 2008
271
6

can i use this method to change my CID ?

No. CID is just reflected here, not dictated by this value. It's stored elsewhere, and has a backup on top of that.

To the Hero owner, enabling USB mode doesn't have anything to do with the brick. The brick occurs when the recovery method overwrites mtd0, so it can happen any time you push recovery.

People are working on getting a better method, but for now, at least we have a way out of the madness. :)

And right now, you're correct - we have root, but not /system access while the phone is running. You can modify /system in recovery, but not outside.
 
Last edited:

Gooner4_1998

Senior Member
Dec 12, 2009
104
0
Re: [USB-BRICK FIX]Restore USB function on your bricked Desire

@cedeel, fair comment and thanks!

-------------------------------------
Sent from my HTC Desire
 

terminal 7

Senior Member
Jan 27, 2008
469
45
exeter, uk.
yyyyaaaaaaayyyyyy!!!!!

first class XDA-DEV team work , just what this thing has always been about, i love it !!!


hooo haaa heeee yaahh eee oooo weeee aaahhhh yayyyy!!!

(sorry got a bit over excited - i can root my desire and go all froyo now :) )
 

The Professor

Senior Member
Jan 23, 2008
271
6
Yes, what are you doing with the a there?

mv /sdcard/flash_image /data/

Or just download root explorer and do it the easy way, darn it.
 

GhostSoldier

Member
May 27, 2010
30
0
Stockholm
www.jesperjarl.se
Sorry, feel like a total idiot.

I thought you meant "write" a / after data.
Not - write a slash after data.

Well, embarresment or not, I still get the same error with
mv /sdcard/flash_image /data/

Is there a root explorer to mac then? found one, but all the links to it seems to be fake.
 

eViL D:

Retired Recognized Developer
Jun 14, 2006
4,479
1,338
Sorry, feel like a total idiot.

I thought you meant "write" a / after data.
Not - write a slash after data.

Well, embarresment or not, I still get the same error with
mv /sdcard/flash_image /data/

Is there a root explorer to mac then? found one, but all the links to it seems to be fake.

buy it from the market......
 

cedeel

Senior Member
Aug 10, 2009
52
0
Esbjerg
Sorry, feel like a total idiot.

I thought you meant "write" a / after data.
Not - write a slash after data.

Well, embarresment or not, I still get the same error with
mv /sdcard/flash_image /data/

Is there a root explorer to mac then? found one, but all the links to it seems to be fake.

No need to feel like that, we've all been new to this at some point.

But like eViL said, you probably need to enter 'su' first, as a single command.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Kubino was spot on - the misc overwrite was what caused the issue. If you modify a misc.img to include your CID and flash it back to mtd0, you will restore functionality. I can confirm that USB, BT, FM, recovery all work again on my Desire. The only thing we're not certain about is whether the ROM value in misc.img matters at all, but it doesn't appear to.

    Stupid amounts of props go to IEF and adam235 at MoDaCo and kubino here. Thanks to all of you, so much.

    MOD EDIT:
    below is the post, as this was a combined effort, we don't need to link to modaco.....

    As most of you know, people have been hard at work to fix the USB issues we've been seeing due to recovery setting us into USB debugmode.

    After unsuccessful attempts to change the kernel commandline , eg. to:

    board_bravo.disable_uart3=0
    board_bravo.usb_h2w_sw=0

    we've been successful in discovering (with the help of XDA-developers) that these switches are stored in the first NAND partition, mtd0, or 'misc'.

    You must be rooted to try the following, it seems you can't write to mtd0 without root.
    Do step 1 again if you have to.

    Also, SD card functionality has to work. For this, do 'fastboot oem enableqxdm 0' in fastboot mode.



    Steps involved:

    1. Find out your CID. Go into fastboot mode, and do 'fastboot oem boot'.

    The log will say something like the following:

    CODE
    #INFOTAG:Ramdisk OK
    #INFOTAG:smi ok, size = 0
    #INFOTAG:hwid 0x0
    #INFOTAG:skuid 0x21F04
    #INFOTAG:hero panel = 0x0
    #INFOTAG:engineerid = 0x0
    #INFOMCP dual-die
    #INFOMCP dual-die
    #INFOTAG:mono-die = 0x0
    #INFODevice CID is not super CID
    #INFOCID is HTC__E11


    In this specific case, the CID is HTC__E11.

    2. Get the following mtd0.img from the attached files below

    Edit this image to the CID you found above with a hex editor.

    Optionally, you can use this CID generator by stevebrush instead. Untested by me, but it should work properly.
    //Edit: Updated link location for stevebrush. Thanks a ton for the generator!

    3. Get flash_image from the attached files below
    Move this to /data/ , and flash the modified image using:

    "/data/flash_image misc /data/mtd0.img"

    You can move both mtd0.img and flash_image by putting it on your sdcard, and issueing the following command in a terminal emulator:

    'cat /sdcard/flash_image > /data/flash_image'
    'cat /sdcard/mtd0.img > /data/mtd0.img'

    You might have to do 'chmod u+x /data/flash_image' before you run the commands (or chmod 755 /data/flash_image)



    4. Repeat step 3 a couple of times if it doesn't seem to work well.

    5. All done! Reboot, you should have normal usb connectivity. Post your 'fastboot oem boot' log and intermediate steps if it fails.


    Credits:

    -kubino @ XDA for providing us with the 'misc' information
    -TheProfessor @ irc.freenode.net #modaco for being the first test subject + debugging
    -adam235 @ irc.freenode.net #modaco for being a test subject as well + debugging
    -SgtDavePwnage @ irc.freenode.net #modaco -> moral support + debugging
    wink.gif

    -DrMon @ irc.freenode.net #modaco -> being brave enough to test on his non-bricked device!
    4
    Am i thoroughly f'd if it says

    fastboot oem boot
    INFO[ERR] boot image does not exist!!!

    edit: made some progress, got recovery to recognize and mount my sd-card, now what?

    progress: flashed a rom and managed to get my log

    Code:
    c:\android-sdk-windows\tools>fastboot oem boot
                                  ... INFOsetup_tag addr=0xA0000100 cmdline add=0x8E
    07F9F0
    INFOTAG:Ramdisk OK
    INFOTAG:smi ok, size = 0
    INFOTAG:hwid 0x0
    INFOTAG:skuid 0x26A04
    INFOTAG:hero panel = 0x3
    INFOTAG:engineerid = 0x0
    INFOMCP dual-die
    INFOMCP dual-die
    INFOTAG:mono-die = 0x0
    INFODevice CID is not super CID
    INFOCID is HTC__Y13
    INFOsetting->cid::HTC__Y13
    INFOserial number: HT07XPL06015
    INFOcommandline from head: no_console_suspend=1 msmsdcc_sdioirq=
    INFO1 wire.search_count=5
    INFOcommand line length =459
    INFOactive commandline: board_bravo.disable_uart3=1 board_bravo.
    INFOusb_h2w_sw=1 board_bravo.disable_sdcard=0 diag.enabled=0 boa
    INFOrd_bravo.debug_uart=0 smisize=0 userdata_sel=0 androidboot.e
    INFOmmc=false  androidboot.baseband=5.17.05.08 androidboot.cid=H
    INFOTC__Y13 androidboot.carrier=HTC-Nor androidboot.mid=PB992000
    INFO0 androidboot.keycaps=qwerty androidboot.mode=normal android
    INFOboot.serialno=HT07XPL06015 androidboot.bootloader=0.93.1000
    INFOno_console_suspend=1 msmsdcc_sdioirq=1 wire.search_count=5
    INFOaARM_Partion[0].name=misc
    INFOaARM_Partion[1].name=recovery
    INFOaARM_Partion[2].name=boot
    INFOaARM_Partion[3].name=system
    INFOaARM_Partion[4].name=cache
    INFOaARM_Partion[5].name=userdata
    INFOpartition number=6
    INFOValid partition num=6
    INFOjump_to_kernel: machine_id(2457), tags_addr(0x20000100), ker
    INFOnel_addr(0x20008000)
    INFO-------------------hboot boot time:26841 msec
    FAILED (status read failed (Too many links))
    finished. total time: 4.557s

    Apparently "HTC__Y13" is the CID. How can I find out my ROM version for the generator? Flashed InsertCoin v27 earlier on in this process, if it matters.

    e. could it be 2.36.405.8?

    Are you s off? If yes then forget about the info cid and rom number, just do fastboot oem eraseconfig, and you're done.

    Sent from my HTC Desire using Tapatalk
    3
    'fastboot oem eraseconfig' will easily do the unbricking for devices with unlocked bootloaders (eg: with Alpharev's hboot)

    Sent from my HTC Desire using XDA App
    3
    A little help in a mini tutorial

    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?
    cmdm.jpg


    i only get error..


    please help! :(

    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!

    ;);)
    2
    when i try to execute fastboot.exe I get this message "the program can't start because AdbWinApi.dll is missing from your computer. Try reinstalling the program to fix this problem." I reinstalled the program twice but I keep getting this message. What am I doing wrong???

    I think I don't have a problem with my sd card. The only problem is that I cannot connect my phone as an external drive. When I plug the usb I get this message, " USB device Not Recognized. One of the USB devices attached to this computer has malfunctioned, and windows does not recognized it. For assistance in solving this problem, click this message."


    Hi,
    I got the same issue.

    What i did:
    Download the AdbWinApi.dll and copy it to C:/windows/system32 & to your SDK Tools folder. Then try youre fastboot command again.
    I dont have the AdbWinApi.dll anymore. so you have to look for it on google.

    good luck