[HOWTO] USB Unbrick

Search This thread

ilos

Senior Member
Jun 17, 2007
1,527
245
Saint Priest
First of all many thanks to IEFtm from Modaco forum for the solution and the how to !!

Here a copy/paste of instructions with some additions :) ( i can't be more clear than him :p )

/!\ IMPORTANT /!\ : only your device will see your sdcard before the end of the unbrick process !!!

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:

disable_uart3=0
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, go into fastboot mode ( device off : volume down + power, select FASTBOOT) , and do:

fastboot oem enableqxdm 0

( you must have android sdk installed, open a command prompt MSDOS under windows, navigate into 'tools' folder and type this command )


Steps involved:

1. Find out your CID. Go into fastboot mode ( device off : volume down + power, select FASTBOOT) , and do :

fastboot oem boot

( you must have android sdk installed, open a command prompt MSDOS under windows, navigate into 'tools' folder and type this command )

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
[B][SIZE="3"]#INFOCID is HTC__E11[/SIZE][/B]

In this specific case, the CID is HTC__E11.

2. Get the following mtd0.img from here or from here: mirror provided by SgtDavePwnage.

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

3. Get flash_image from here or from here: mirror provided by SgtDavePwnage.

You can move both mtd0.img and flash_image by putting it on your sdcard, and issueing the following command in a terminal emulator ( you must do this on your device with Connecbot for exemple ) :

In the terminal emulator ( like connecbot ) you will be at prompt beginning with a $ , type 'su' ( without the quote ) 2 times and you will normally see # at the beginning of the ligne ( or anything else with # ). In this case you are logged as root. You can check it with this command : ls ( check screenshoot to see what's look like )

Now type the following

cat /sdcard/flash_image > /data/flash_image "type enter"
cat /sdcard/mtd0.img > /data/mtd0.img "type enter"
chmod 755 /data/flash_image "type enter"
/data/flash_image misc /data/mtd0.img "type enter"

( repeat last command 2 times to be sure and ignore output errors that you will see )


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.

In case of you get 'permission denied' for 'su' command , you can try to do the same thing as Deffe on modaco forum :

P.S.
before i have reroot my legend make step1 and use fake-flush and not step2. So the phone became rooted and i can use connectbot!

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 ;)
-DrMon @ irc.freenode.net #modaco -> being brave enough to test on his non-bricked device!

You can also check this :

http://forum.xda-developers.com/showthread.php?t=747030
and
http://forum.xda-developers.com/showthread.php?t=748813
and here
http://forum.xda-developers.com/showthread.php?t=733713

to get some information on your situation.

You can go to the original thread http://android.modaco.com/content/h...com/309961/usb-brick-rickrolled-b0rked-fixed/

to get your mtd0.img already modified for your CID ( if someone has posted it )


Click here to DONATE for them ! ;)
 

Attachments

  • device.png
    device.png
    3.3 KB · Views: 1,591
  • device2.png
    device2.png
    7.4 KB · Views: 2,185
Last edited by a moderator:

Learners Lisence

Senior Member
Jun 28, 2010
187
4
Thank You, Ilos. Was waiting for this. Your effort is much appreciated.
Hope our Moderator Sir will put a link to this thread in the first post in this section.

I read through the remedy everyday so I understand a little more each day but I sure hope you will be around when get usb bricked !

Can I practise this on my good device to get a hang of it or will it mess up things big time !
 
Last edited:

zorro12010

Senior Member
Jul 2, 2010
99
6
Hi Ilos,
Thanks for the better detailed information so far, about usb problems.

After obtaining super user access i wrote the following commands as you said.
cat /sdcard/flash_image > /data/flash_image
cat /sdcard/mtd0.img > /data/mtd0.img

After writing the above commands in connectbot and giving the enter, the terminal mentioned that they could not find the files.

I placed them om my sd card. is it necessary to place them in a certain file?
The other commands went well and I rebooted but my telephone was not recognized by the computer.
in the below line you mention that the output errors should be ignored, what do you mean with that, because I receive errors.
" repeat last command 2 times to be sure and ignore output errors that you will see )"

I also wrote the last command two times but with no success.

Thanks in advance.
 

ilos

Senior Member
Jun 17, 2007
1,527
245
Saint Priest
you must put both files at / of your sdcard and you received error at the end of the process ( 0X0000112331 or something like that )
 
Last edited:

ilos

Senior Member
Jun 17, 2007
1,527
245
Saint Priest
you must see your sdcard when you type ls

if you see it, type :

cd sdcard

and type again ls

check if you see flash_image and mtd0.img that you put on your sdcard
 

zorro12010

Senior Member
Jul 2, 2010
99
6
Ilos I managed it with your great help.
I unfortunately had renamed the file mtd0.img which gave the output in the terminal ls mtd0.img.img. and therefore the command could not be read correctly. So I changed the filename and repeated the steps with SUCCESS.
Thanks again.
 

kdma

Senior Member
Aug 8, 2010
80
3
ok edited the img and moved them into the sdcard.what to do now how can i move them in the legend data?
 
Last edited:

kdma

Senior Member
Aug 8, 2010
80
3
You can move both mtd0.img and flash_image by putting it on your sdcard, and issueing the following command in a terminal emulator ( you must do this on your device with Connecbot for exemple ) :

In the terminal emulator ( like connecbot ) you will be at prompt beginning with a $ , type 'su' ( without the quote ) 2 times and you will normally see # at the beginning of the ligne ( or anything else with # ). In this case you are logged as root. You can check it with this command : ls ( check screenshoot to see what's look like )

Now type the following

cat /sdcard/flash_image > /data/flash_image "type enter"
cat /sdcard/mtd0.img > /data/mtd0.img "type enter"
chmod 755 /data/flash_image "type enter"
/data/flash_image misc /data/mtd0.img "type enter"

( repeat last command 2 times to be sure and ignore output errors that you will see )...

how should i use connecbot if i cant boot my phone?
i can only use fastboot
 

Learners Lisence

Senior Member
Jun 28, 2010
187
4
maybe

Maybe Froyo will be gentler on our devices and roms as probably there will be no need to use app2sd + which has been considered, albeit not conclusively, to be one of the major causes of usb bricking (?)
 

izya12

New member
Aug 17, 2010
1
0
Hi all
People that I do?? I can not determine the USB, only in boot mode is determined, I have a new hboot and I can not do step1, can someone help me ka??

Poligon:/mnt/winda/tmp/android/r4-legend-root# ./fastboot-linux oem gencheckpt boot
... INFOsetup_tag addr=0x60000100 cmdline add=0x9D079570
INFOTAG:Ramdisk OK
INFOTAG:smi ok, size = 0
INFOTAG:hwid 0x0
INFOTAG:skuid 0x22F00
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__A07
INFOsetting->cid::HTC__A07
INFOserial number: HT03DNX01548
INFOcommandline from head: no_console_suspend=1 console=null
INFOcommand line length =443
INFOactive commandline: board_legend.disable_uart3=1 board_legen
INFOd.usb_h2w_sw=1 board_legend.disable_sdcard=0 diag.enabled=0
INFOboard_legend.debug_uart=0 smisize=0 userdata_sel=0 androidbo
INFOot.emmc=false androidboot.baseband=7.08.35.21 androidboot.c
INFOid=HTC__A07 androidboot.carrier=HTC-Russia androidboot.mid=P
INFOB7610000 androidboot.keycaps=qwerty androidboot.mode=recover
INFOy androidboot.serialno=HT03DNX01548 androidboot.bootloader=0
INFO.43.0003 no_console_suspend=1 console=null
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
INFOmpu_nand_acpu_rw 15E 1000
FAILED (status read failed (Protocol error))
 

k.mooijman

Member
Mar 24, 2007
29
1
INFOactive commandline: board_legend.disable_uart3=1 board_legen
INFOd.usb_h2w_sw=1 board_legend.disable_sdcard=0 diag.enabled=0


look at these lines
it has :
board_legend.disable_uart3=1
board_legend.usb_h2w_sw=1

acording to android.modaco.com/content/htc-legend-legend-modaco-com/309961/usb-brick-rickrolled-b0rked-fixed/ these values should be 0
so your Legend is USB-bricked ( like mine was , do not worry it is solvable )
follow the modago unbrick howto an have fun with your legend !!


Sorry for the choppy link but my account is not jet enabled for outside links
 
Last edited:

ilos

Senior Member
Jun 17, 2007
1,527
245
Saint Priest
Hi all
People that I do?? I can not determine the USB, only in boot mode is determined, I have a new hboot and I can not do step1, can someone help me ka??

Poligon:/mnt/winda/tmp/android/r4-legend-root# ./fastboot-linux oem gencheckpt boot
... INFOsetup_tag addr=0x60000100 cmdline add=0x9D079570
INFOTAG:Ramdisk OK
INFOTAG:smi ok, size = 0
INFOTAG:hwid 0x0
INFOTAG:skuid 0x22F00
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__A07
INFOsetting->cid::HTC__A07
INFOserial number: HT03DNX01548
INFOcommandline from head: no_console_suspend=1 console=null
INFOcommand line length =443
INFOactive commandline: board_legend.disable_uart3=1 board_legen
INFOd.usb_h2w_sw=1 board_legend.disable_sdcard=0 diag.enabled=0
INFOboard_legend.debug_uart=0 smisize=0 userdata_sel=0 androidbo
INFOot.emmc=false androidboot.baseband=7.08.35.21 androidboot.c
INFOid=HTC__A07 androidboot.carrier=HTC-Russia androidboot.mid=P
INFOB7610000 androidboot.keycaps=qwerty androidboot.mode=recover
INFOy androidboot.serialno=HT03DNX01548 androidboot.bootloader=0
INFO.43.0003 no_console_suspend=1 console=null
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
INFOmpu_nand_acpu_rw 15E 1000
FAILED (status read failed (Protocol error))

USB bricked.... pls follow the HOWTO in the first post...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    First of all many thanks to IEFtm from Modaco forum for the solution and the how to !!

    Here a copy/paste of instructions with some additions :) ( i can't be more clear than him :p )

    /!\ IMPORTANT /!\ : only your device will see your sdcard before the end of the unbrick process !!!

    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:

    disable_uart3=0
    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, go into fastboot mode ( device off : volume down + power, select FASTBOOT) , and do:

    fastboot oem enableqxdm 0

    ( you must have android sdk installed, open a command prompt MSDOS under windows, navigate into 'tools' folder and type this command )


    Steps involved:

    1. Find out your CID. Go into fastboot mode ( device off : volume down + power, select FASTBOOT) , and do :

    fastboot oem boot

    ( you must have android sdk installed, open a command prompt MSDOS under windows, navigate into 'tools' folder and type this command )

    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
    [B][SIZE="3"]#INFOCID is HTC__E11[/SIZE][/B]

    In this specific case, the CID is HTC__E11.

    2. Get the following mtd0.img from here or from here: mirror provided by SgtDavePwnage.

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

    3. Get flash_image from here or from here: mirror provided by SgtDavePwnage.

    You can move both mtd0.img and flash_image by putting it on your sdcard, and issueing the following command in a terminal emulator ( you must do this on your device with Connecbot for exemple ) :

    In the terminal emulator ( like connecbot ) you will be at prompt beginning with a $ , type 'su' ( without the quote ) 2 times and you will normally see # at the beginning of the ligne ( or anything else with # ). In this case you are logged as root. You can check it with this command : ls ( check screenshoot to see what's look like )

    Now type the following

    cat /sdcard/flash_image > /data/flash_image "type enter"
    cat /sdcard/mtd0.img > /data/mtd0.img "type enter"
    chmod 755 /data/flash_image "type enter"
    /data/flash_image misc /data/mtd0.img "type enter"

    ( repeat last command 2 times to be sure and ignore output errors that you will see )


    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.

    In case of you get 'permission denied' for 'su' command , you can try to do the same thing as Deffe on modaco forum :

    P.S.
    before i have reroot my legend make step1 and use fake-flush and not step2. So the phone became rooted and i can use connectbot!

    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 ;)
    -DrMon @ irc.freenode.net #modaco -> being brave enough to test on his non-bricked device!

    You can also check this :

    http://forum.xda-developers.com/showthread.php?t=747030
    and
    http://forum.xda-developers.com/showthread.php?t=748813
    and here
    http://forum.xda-developers.com/showthread.php?t=733713

    to get some information on your situation.

    You can go to the original thread http://android.modaco.com/content/h...com/309961/usb-brick-rickrolled-b0rked-fixed/

    to get your mtd0.img already modified for your CID ( if someone has posted it )


    Click here to DONATE for them ! ;)
    3
    I had partial bricking problem with boot cycling and a lack of standard usb connectivity. Here is an overview of how I solved this problem.

    Background
    I rooted my unlocked Bell Canada Legend using the three guides by David Cogen at the unLocker: Downgrade the HTC Legend to 1.31 so It can be Rooted (12.13.10); How to Root the HTC Legend (Updated 12.13.10), and How to Load a Custom Rom on the Legend.

    This involved, among other things, making a gold card, installing the Windows Android SDK, downloading the specified downgrading tool, flashing RRU_LEGEND_HTC_WWE_1.31.405.5 ... signed.exe, installing HTC Sync 2.0.33, getting Legend rooting tools, and Loading the excellent Keep it Simple rooted 2.1 ROM (This was before the KIS 2.2 Rom had been released). With some minor difficulties I got this going and the KIS rooted rom was excellent.

    However, my real intention had been to install a rooted version of Android 2.2. However, it would not install as the HBOOT version was 0.30.

    I tried using the "Howto Update HBOOT to 1.00 keeping your Legend rooted" but I deviated from the instructions and ended up with a semi-bricked Legend that exhibited the commonly encountered boot cycling problem.

    After about 8 hours of deep anxiety if found a solution. I lost root capability but got an unbricked, functioning phone with the latest Android 2.2. Here's an overview that may be useful to some Android newbies like me.

    PROBLEMS
    Boot cycling: start booting process with a buzz, green HTC logo on a white screen for a while, then black screen and reboot, on so on. No access to a functioning system.

    No usb connection with Android SDK. i.e.: command adb device showed on available device, HTC* offline.

    At this point I though I had a brick. There are some solutions to this problem posted but they appeared way too complicated.
    Fortunately, the fastboot menu (hold down return button while pressing power on switch) came up as did the hboot menu. However, I couldn't get to recovery in the hboot menu.

    Solution.
    On Windows PC used for this work I installed the unRevolkedmod USB drivers which allowed me to connect with the Legend connected via usb cable and in fastboot mode.

    In a MSDOS command window in Windows XP I executed from the AndroidSDK subdirectory containing the fastboot executable (in my case C:\...android-sdk-windows\tools\) "fastboot oem enableqxdm 0" which enabled fastboot usb-plugin on the phone (see it com up in red text in the fastboot menu).

    In another MSDOS command window I changed to the unzipped "r4-legend-root" directory and ran "fastboot-windows.exe oem rebootRUU" that allowed me to execute the latest RUU (either execute the RUU from this MSDOS command window or click on the file in Windows File Manager) and install the stock HTC 2.2 rom normally following the RUU menus. I used the available RUU_Legend_Froyo_S_HTC_WWE_3.15.405.3.....160328_signed.exe.

    I now have a fully functional Legend with the stock unrooted HTC Android 2.2 with hboot 1.01.

    Also, I tried the "Rooting with HBOOT 1.0" howto following the directions exactly, but couldn't get to work. I got as far as a functioning Android 2.1 but didn't/couldn't get the 2.2 rom to install as 2.1 wasn't rooted. I think I'll wait until the knowledge base improves. I just reinstalled the stock HTC 2.2 and it is running fine. Much better than a brick!

    Although this is short on details, they are available in various threads. I trust that this may be of some help to others that are in the situation I was in. The answer is out there, it just takes a lot of digging!
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone