• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Q] Any chance of fixing USB Brick w/o root ?

Search This thread

flashb

New member
Sep 25, 2010
3
0
Flashb, is your problem solved now?

Swyped with my S-OFF'd brain using teh internetz

yes it is :D

and if it doesn't work for you try this cod in terminal

cat /sdcard/rageagainstthecage-arm5.bin > /data/data/rageagainstthecage-arm5.bin
cat /sdcard/flash_image > /data/data/flash_image
cat /sdcard/mtd0.img > /data/data/mtd0.img
cd /data/data/
chmod 755 rageagainstthecage-arm5.bin flash_image

/data/data/rageagainstthecage-arm5.bin

restart the terminal

cd /data/data/
./flash_image misc mtd0.img


then reboot your device

that's how I solve it

thank you
 
Last edited:

fezy

Senior Member
Sep 16, 2009
82
6
Edit: never mind i worked my way around it.. also if any one is having misc permission denied ensure u got USB debugging checked
 
Last edited:

westernmg

Senior Member
Jul 9, 2010
544
250
I couldn't post external links, forum limitation for new users... Now I see I can so:

This is a specific situation - usb brick and totally stock rom, recovery and hboot. It's not required for people who have a modified recovery and a rooted rom. It's easy like 1-2-3.

Before doing anything else enable the Debug Mode in the Applications / Dev menu

1. Download the rageagainstthecage exploit from the authors site:
http://c-skills.blogspot.com/2010/08/please-hold-line.html

2. Download the flash_image and misc (mtd0.img) partition image from this thread.
http://forum.xda-developers.com/showthread.php?t=691639&highlight=usb+brick
Modify the mtd0.img according to your phones CID (how to get the CID also explained in the thread)

2. Download Android Terminal Emulator from the Market

3. Copy the exploit binary (rageagainstthecage-arm5.bin), the flash_image and modifed mtd0.img to the sdcard via an external card reader

4. Start the Terminal

5. Copy the files to the Terminal app data directory (the only place on the data partition you will have write access while running the Terminal), and make the binaries executable
Code:
cat /sdcard/rageagainstthecage-arm5.bin > /data/data/jackpal.androidterm/shared_prefs/rageagainstthecage-arm5.bin
cat /sdcard/flash_image > /data/data/jackpal.androidterm/shared_prefs/flash_image 
cat /sdcard/mtd0.img > /data/data/jackpal.androidterm/shared_prefs/mtd0.img 
cd  /data/data/jackpal.androidterm/shared_prefs/
chmod 755 rageagainstthecage-arm5.bin flash_image

6. Run the exploit
Code:
/data/data/jackpal.androidterm/shared_prefs/rageagainstthecage-arm5.bin
After the exploit exits/finishes there should be a short system freeze, followed by inablity to issue any command from the terminal (don't worry). Exit the Terminal by long pressing HOME and force close the Terminal app from the Application Manager

7. Start the terminal again, a root prompt should be visible

8. Flash the misc partition
Code:
cd /data/data/jackpal.androidterm/shared_prefs
./flash_image misc mtd0.img

9. Reboot

Done and done
Enjoy

PS. I suck at writing tutorials, but if the details are still hazy for you after reading this - better to service the phone, because you might end up bricking the device totally - cheers

This worked for me like a charm!
You are my Hero of the week!

Dziekuje bardzo!
 

westernmg

Senior Member
Jul 9, 2010
544
250
Now i have the next problem:

Everytime i do a full nandroid backup my desire becomes USB-bricked and i have to repeat the unbricking procedere.

I testet with flashed recovery-clockwork-2.5.1.2-bravo.img, also with Rommanager and recovery-clockwork-2.5.0.7 as update.zip.

Any ideas ?

EDIT:
I just flashed newest AmonRA recovery and my nandroid backups are working again without bricking my Baby!
http://forum.xda-developers.com/showthread.php?t=839621
 
Last edited:

derfull

Member
Sep 30, 2010
8
1
boite-a-pixels.2037.org
Hi

Well ! THX

My phone having trouble in mounting the SD card, and after trying to resolve that. usb Brick -_-

I have reflash the phone with the last htc stock rom via fastboot, thinking "it will correct the problem".
In fact no more root and still no usb support, and hboot 0.93.001. (Woot - Woot)

After a night of research, i found your message, and Voila !

Thx
 
Last edited:

reef2009

Senior Member
Thnx guys.


It worked!!!


First anable SDcard reading in cmd "fastboot oem enableqxdm 0"

I modified mtd0.img for HTC__E11 & Rom 2.29.405.2 and downloaded rageagainstthecage-arm5.bin + flash_image. (see attacht files in USB-debricking.rar)
Put them on a SDcard and anabled USB - development.



$ cat /sdcard/rageagainstthecage-arm5.bin > /data/data/rageagainstthecage-arm5.bin
$ cat /sdcard/flash_image > /data/data/flash_image
$ cat /sdcard/mtd0.img > /data/data/mtd0.img
$ cd /data/data/
$ chmod 755 rageagainstthecage-arm5.bin flash_image
$ /data/data/rageagainstthecage-arm5.bin
$ cd /data/data/
$ ./flash_image misc ./mtd0.img

THNX:)
 

Attachments

  • USB-debricking.rar
    49.8 KB · Views: 107
Last edited:

Freddan80

Senior Member
Aug 11, 2009
289
72
Gothenburg
and now when only trying to move it to '/data/data/rageaginstthecage-arm5.bin', I'm getting 'permission denied'

but I should be getting that I don't have root, so I don't even understand why that command even should work.
 

godina

Senior Member
Oct 29, 2009
56
7
Pivka
and now when only trying to move it to '/data/data/rageaginstthecage-arm5.bin', I'm getting 'permission denied'

but I should be getting that I don't have root, so I don't even understand why that command even should work.

Same here. Tried typing su first but it allso gives me premission denied:mad:. So what now, how can i make it work and fix my desire and how did you guys did it:confused:?
 

quanchi

Member
Apr 22, 2009
22
6
Warsaw
Same for me what am I doing wrong?

If you get a directory nonexistent error it means that the target directory (/data/data/ in this case) doesn't exist. This is rather due to a misspelled command.

Please read the post about the /data/data/jackpal.androidterm/shared_prefs/ directory below
 
Last edited:

quanchi

Member
Apr 22, 2009
22
6
Warsaw
and now when only trying to move it to '/data/data/rageaginstthecage-arm5.bin', I'm getting 'permission denied'

but I should be getting that I don't have root, so I don't even understand why that command even should work.

try the /data/data/jackpal.androidterm/shared_prefs/ directory. That's the directory which should belong to the Android Terminal Emulator app, and should be writable by it.

I have a strong suspicion that the people succeding in wrting to /data/data who posted that info in this thread already had root and unintentionally misinformed the rest of you :) If you read the thread from the beginning you will see that I wasn't able to write to /data/data and chose another directory
 
Last edited:
  • Like
Reactions: Freddan80

Freddan80

Senior Member
Aug 11, 2009
289
72
Gothenburg
try the /data/data/jackpal.androidterm/shared_prefs/ directory. That's the directory which should belong to the Android Terminal Emulator app, and should be writable by it.

I have a strong suspicion that the people succeding in wrting to /data/data who posted that info in this thread already had root and unintentionally misinformed the rest of you :) If you read the thread from the beginning you will see that I wasn't able to write to /data/data and chose another directory
After checking my '/data/data' I can see that I have absolutly nothing in there.
 

Freddan80

Senior Member
Aug 11, 2009
289
72
Gothenburg
try the /data/data/jackpal.androidterm/shared_prefs/ directory. That's the directory which should belong to the Android Terminal Emulator app, and should be writable by it.

I have a strong suspicion that the people succeding in wrting to /data/data who posted that info in this thread already had root and unintentionally misinformed the rest of you :) If you read the thread from the beginning you will see that I wasn't able to write to /data/data and chose another directory
I have tried that command several times and yes I have checked my spelling and I'm using 'Android Teminal Emulator' so the "working" folder should be named the same.

I'm going to try to wipe the phone and try again.
 

Freddan80

Senior Member
Aug 11, 2009
289
72
Gothenburg
try the /data/data/jackpal.androidterm/shared_prefs/ directory. That's the directory which should belong to the Android Terminal Emulator app, and should be writable by it.

I have a strong suspicion that the people succeding in wrting to /data/data who posted that info in this thread already had root and unintentionally misinformed the rest of you :) If you read the thread from the beginning you will see that I wasn't able to write to /data/data and chose another directory
Are you sure that you didn't have some kind of root yourself, cause when trying to write something to that folder I only get "directory doesn't exist"
?
 

Freddan80

Senior Member
Aug 11, 2009
289
72
Gothenburg
SUCCESS!!!!

I used 'Better Terminal Editor' (it's better in every way :)) and changed some of your lines to the place whete 'BTE' rests and it went well.

Thanks for all the help this thread gave me.
 
  • Like
Reactions: NYRican

quanchi

Member
Apr 22, 2009
22
6
Warsaw
SUCCESS!!!!

I used 'Better Terminal Editor' (it's better in every way :)) and changed some of your lines to the place whete 'BTE' rests and it went well.

Thanks for all the help this thread gave me.

Nice,

What I have done took place a while ago. It's possible that the developer of Android Terminal Emulator changed the directory name. Either way you got the idea, and figured out for yourself that you just need to find a directory writable by the process of any terminal app you're using :)

Cheers
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Any chance of adding some links or actual information?
    I've got exactly the same problem and you seem to have the solution.
    Any chance of sharing?

    I couldn't post external links, forum limitation for new users... Now I see I can so:

    This is a specific situation - usb brick and totally stock rom, recovery and hboot. It's not required for people who have a modified recovery and a rooted rom. It's easy like 1-2-3.

    Before doing anything else enable the Debug Mode in the Applications / Dev menu

    1. Download the rageagainstthecage exploit from the authors site:
    http://c-skills.blogspot.com/2010/08/please-hold-line.html

    2. Download the flash_image and misc (mtd0.img) partition image from this thread.
    http://forum.xda-developers.com/showthread.php?t=691639&highlight=usb+brick
    Modify the mtd0.img according to your phones CID (how to get the CID also explained in the thread)

    2. Download Android Terminal Emulator from the Market

    3. Copy the exploit binary (rageagainstthecage-arm5.bin), the flash_image and modifed mtd0.img to the sdcard via an external card reader

    4. Start the Terminal

    5. Copy the files to the Terminal app data directory (the only place on the data partition you will have write access while running the Terminal), and make the binaries executable
    Code:
    cat /sdcard/rageagainstthecage-arm5.bin > /data/data/jackpal.androidterm/shared_prefs/rageagainstthecage-arm5.bin
    cat /sdcard/flash_image > /data/data/jackpal.androidterm/shared_prefs/flash_image 
    cat /sdcard/mtd0.img > /data/data/jackpal.androidterm/shared_prefs/mtd0.img 
    cd  /data/data/jackpal.androidterm/shared_prefs/
    chmod 755 rageagainstthecage-arm5.bin flash_image

    6. Run the exploit
    Code:
    /data/data/jackpal.androidterm/shared_prefs/rageagainstthecage-arm5.bin
    After the exploit exits/finishes there should be a short system freeze, followed by inablity to issue any command from the terminal (don't worry). Exit the Terminal by long pressing HOME and force close the Terminal app from the Application Manager

    7. Start the terminal again, a root prompt should be visible

    8. Flash the misc partition
    Code:
    cd /data/data/jackpal.androidterm/shared_prefs
    ./flash_image misc mtd0.img

    9. Reboot

    Done and done
    Enjoy

    PS. I suck at writing tutorials, but if the details are still hazy for you after reading this - better to service the phone, because you might end up bricking the device totally - cheers
    1
    Well I USB bricked my Desire last night.

    To make things worse I was only able to apply the SD Card workaround via fastboot.

    After flashing the update.zip from the modaco fix I instantly went back to the stock rom using the fastboot RUU process, without actually checking if it solved all the problems...

    I know I had it coming...

    Before I ship the phone out for repairs - maybe someone here knows if there is a chance to unbrick without root (nor having HBOOT version that allows to use any other method of rooting other than Unrevoked)

    Code:
    HBOOT 0.93
    European 2.10.405 OTA

    Thanks in advance
    1
    Solved!

    I was able to successfully unbrick the phone :)

    It wouldn't be possible without rageagainstthecage, All the people writing the tutorials on USB unbricking, QuickSSHd and the Terminal Emulator app. Thanks to the authors.


    I'll try to sum things up for anyone interested:

    The problem
    Because of acting without thinking I ended up with a stock unrooted rom and a partial USB brick. To make things worse I accepted the OTA update, installing the oh so loved HBOOT 0.93.100 S-ON.

    The Solution
    After some reading about rageagainstthecage, PoC code on which the Unrevoked rooting solution is based I tried to run the exploit directly on the phone.

    Without having access to adb I wasn't able to find a place to put the executable, as the /data/ directory is writable only by the system user and the system group, and most tutorials suggest to place the exploit somewhere inside that directory. But all the tutorials I found mentioned using adb push to put the file on the phone, which probably operates on the phone as system:system as it is capable of writing to the /data dir. I wasn't able to write there as I had the id of the Terminal Application

    Since apps storing data seem to store er... data in /data/data ;) I had a little breakthru. Becaue I couldn't find a free telnet solution I purchased the QuickSSHd from Android Market.

    This allowed me to have write access to /data/data/<package_name>/home where I created a world readable (755) directory. I scp'd the rageagaintthecage, modified misc partition image and flash_image binary to the phones filesystem, and made them executable. I could've used the Terminal Apps <data dir>/shared_prefs directory (which would be a $$$ free solution, as the ssh was not free, but not expensive either) but I'm lazy and doing stuff from a PC keyboard is easier than from a touch keyboard.

    Running the exploit and flash_image from inside a ssh session seemed like a good idea but the sshd died after running the exploit, and didn't want to start untill the phone was rebooted. So next time I just started the sshd and done the rest of the stuff from a Terminal Emulator (After preparing scripts for ease of execution, and dropboxing the paths for copy paste :) ). After running the exploit the Terminal Emulator app stopted working correctly (as expected) but after force closing it and running it again I was greeted with a # prompt :)

    I flashed the misc partition with an image modified with my phones CID, rebooted and voila! USB brick gone :)

    Now I just have to beat one thing into my empty head (in the manner of "stop, drop, and roll" firedrill mantra). STOP, READ and THINK - before flashing

    g'night :)
    1
    and now when only trying to move it to '/data/data/rageaginstthecage-arm5.bin', I'm getting 'permission denied'

    but I should be getting that I don't have root, so I don't even understand why that command even should work.

    try the /data/data/jackpal.androidterm/shared_prefs/ directory. That's the directory which should belong to the Android Terminal Emulator app, and should be writable by it.

    I have a strong suspicion that the people succeding in wrting to /data/data who posted that info in this thread already had root and unintentionally misinformed the rest of you :) If you read the thread from the beginning you will see that I wasn't able to write to /data/data and chose another directory