# [How to] Flash factory images to fix your brick



## kman79 (Jun 11, 2011)

I was wondering if someone would be kind enough to write a guide on how to utilize the factory images that were released today. I'd like to go back to the out-of-box state because I seem to have messed something up. I'm unable to get into recovery, I tried install clockwork mod, and obviously I've done something wrong. The phone still boots up and functions and I'm still able to get into fastboot, I'm just unable to get into recovery.

I'd like to start fresh from an out-of-box state, but I'm having a hard time finding the commands to utilize the factory images to do so. Any help with this is greatly appreciated


----------



## swimminsurfer256 (Sep 23, 2011)

After I pseudo-bricked my Nexus after rooting it I had to get it back. There were 3 images in the thing I found: boot.img, system.img, and userdata.img (sometimes called data.img I think). It let my phone boot again (after being pretty much bricked -- I forgot that locking/unlocking bootloader would wipe data and I also factory reset/wiped system and data/media / sdcard wouldn't mount). I'm pretty sure the ones I used were for the GSM version because my radio didn't work after but if they released the CDMA/LTE then definitely use those!
You just do:
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot reboot

Worked great to fix my phone


----------



## kman79 (Jun 11, 2011)

Thanks for the post.

It did help. However, my stock recovery is still not functional, it just shows a green android on his back with a Red Triangle with a Black exclamation mark on his chest







Any ideas?


----------



## humungus (Jun 6, 2011)

kman79 said:


> Thanks for the post.
> 
> It did help. However, my stock recovery is still not functional, it just shows a green android on his back with a Red Triangle with a Black exclamation mark on his chest
> 
> ...


When you get to that screen (with the red triangle), just press all the buttons and stock recovery should open.


----------



## runandhide05 (Sep 20, 2011)

It wont open if he flashed cwm and has not fastboot the stock recovery. U need to fast boot the stock recovery. Or reflash cwm. Ice noticed like others mine will not steady flashed after a reboot. So I have to flask cwm each time that I want to go into cwm. Using room manager is the easiest way


----------



## JWellington (Aug 11, 2011)

-Extract Everything in the .tgz . The TAR too.
- open the flash-all.sh
- look at it
- execute every command in a command prompt/terminal

Of course, you must already have adb and fastboot all setup properly.
Source: I just did it myself;

Be careful with the radio images, as there are two of them, and they are different. I borked mine the first time mixing them up. It's all good now though.


----------



## andrewp3481 (Sep 12, 2011)

Yo, I just want to say thank you to the community for always helping out. That being said I have a question. Has there been a perm recovery img released? I flashed the cwm 5.x toro.img and was able to flash a su.zip then I even downloaded rom manager and flashed the recovery again like I had read. So my question is....is that if I have my boot loader unlocked and I've flashed cwm via fast boot and rom manager, then why can't I access cwm via the boot loader?

Sent from my Galaxy Nexus using RootzWiki Forums


----------



## swimminsurfer256 (Sep 23, 2011)

Here, I made a post with a step-by-step as well as a link to the images that I found
http://rootzwiki.com/topic/12069-guide-last-resort-fix-for-unfixable-bootloopingpseudo-brickedbricked-phones/


----------



## thepolishguy (Jun 6, 2011)

JWellington said:


> -Extract Everything in the .tgz . The TAR too.
> - open the flash-all.sh
> - look at it
> - execute every command in a command prompt/terminal
> ...


Can I ask you to elaborate on this post just a bit?

I opened the .sh file and see the licensing agreement and then the fastboot commands...


```
<br />
<br />
fastboot flash bootloader bootloader-toro-primekk15<br />
<br />
<br />
imgfastboot reboot-bootloadersleep 5fastboot flash radio radio-toro-i515.ek02<br />
<br />
imgfastboot reboot-bootloadersleep 5fastboot flash radio-cdma radio-cdma-toro-i515.ek05<br />
<br />
imgfastboot reboot-bootloadersleep 5fastboot -w update image-mysid-icl53f.zip<br />
<br />
```
so I can just copy and paste these in order and it will return my phone to stock icl53f?

Sorry - I am just wanting to make sure I understand the process. Because I have seen a few different methods. thanks.

*****EDIT*****

And before someone asks - yes I saw the post right above mine and I did read it. That is why I have questions. Like I said - it may simply be 2 different methods of accomplishing the same thing - but that is why I am looking for clarification. The fastboot commands inside the .sh file look like they install everything in the .zip without having to extract them plus it looks like it does a few extra things that would not be done if you simply extracting the .zip and flashing the files. For instance - there are no radio files in the .zip.

kthxbai


----------



## JWellington (Aug 11, 2011)

Assuming you have everything setup already....

cd to the directory
adb devices
[if you see something listen here, good]
adb reboot bootloader
[wait for bootloader]
fastboot flash bootloader bootloader-toro-primekk15dsa
fastboot reboot-bootloader
[wait]
fastboot flash radio radio radio-toro-i515.ek02
fastboot reboot-bootloader
flash radio-cdma radio-cdma-toro-i515.ek05
fastboot reboot-bootloader.
fastboot -w update image-mysid-icl53f.zip

Done!EDIT: Typo


----------



## thepolishguy (Jun 6, 2011)

JWellington said:


> Assuming you have everything setup already....
> 
> cd to the directory
> adb devices
> ...


That is exactly what I was looking for - thank you so much!


----------



## rdubb (Jul 16, 2011)

runandhide05 said:


> It wont open if he flashed cwm and has not fastboot the stock recovery. U need to fast boot the stock recovery. Or reflash cwm. Ice noticed like others mine will not steady flashed after a reboot. So I have to flask cwm each time that I want to go into cwm. Using room manager is the easiest way


You can solve the CWM problem by just using root explorer find your system/recovery-from-boot.p. just rename it to 1recovery-from-boot.p- you could probably just delete it but this is how I fixed it.


----------



## thepolishguy (Jun 6, 2011)

JW's write up was great. I wanted to expand on it - only because it is geared towards people that have a better understanding of the process. I am pretty noobish so I wanted to do a write up that fellow noobish to android guys/gals could follow a little easier. So here it goes...

How To Re-Flash Stock Image​
Assuming you have ADB and everything setup already....

1. I just did this for practice. I did not need to do it -but I wanted to do it successfully before I "needed" to do it. I thought I would expand a little on the process and make it a little more noob friendly.

2. Getting started.

a. *Read through the entire set of instructions first.*

b.* I am not responsible if you BORK your phone.* I BORKED mine using someone else's instructions and tried to write a very detailed step-by-step to help others out- but it is completely possible I have also made some small error in the instructions.

3. *This will completely wipe your phone - including the SD partition - so transfer any files you need before you do this.*
4. This will not re-lock your bootloader. It will remain unlocked.
5. Syntax (spelling, spaces, periods, dashes, CAPITOL, or lower case) matters. There were some spelling errors and file extensions left off the commands - and that will not work.

6.I used the file&#8230;

mysid-icl53f-factory-65895fa8.tgz

&#8230;which is 4.0.2 for the cdma/lte galaxy nexus [code name = toro/mysid]. The file is located here...

http://www.google.co...NiI9yTxKdUyW1tA

7. Unzip the file (I used 7.zip to do this).

Then you will have a .tar file&#8230;

mysid-icl53f-factory-65895fa8.tar

8. Unzip that file and you should end up with a folder&#8230;

mysid-icl53f

Inside that folder you will have five files&#8230;

i. bootloader-toro-primekk15.img
ii. flash-all.sh
iii. radio-cdma-toro-i515.ek05.img
iv. radio-toro-i515.ek02.img
v. image-mysid-icl53f.zip

Do not unzip "image-mysid-icl53f.zip"

9. Go ahead and copy and paste all these files to your directory&#8230;

/android/platform-tools

(or whatever directory you work from. You do not need the "flash-all.sh" so you do not have to copy it).

10. Open the Command Prompt in the directory where you have placed the necessary files by navigating to the directory, pressing shift, and then right mouse click (normally "C: /android/tools" or C: /android/platform-tools). This will bring up the dialogue box and you can select "open a command window here".

11. Then enter the command&#8230;

adb devices

[&#8230;this should return your serial number&#8230;]

12. enter the command&#8230;

adb reboot-bootloader

[wait for bootloader - you should here 2 alert sounds - not just 1]

13. enter the command&#8230;

fastboot flash bootloader bootloader-toro-primekk15.img

14. enter the command&#8230;

fastboot reboot-bootloader

[wait]

15. enter the command&#8230;

fastboot flash radio radio-toro-i515.ek02.img

16. enter the command&#8230;

fastboot reboot-bootloader

[wait]

17. enter the command&#8230;

fastboot flash radio-cdma radio-cdma-toro-i515.ek05.img

18. enter the command&#8230;

fastboot reboot-bootloader

19. enter the command&#8230;

fastboot -w update image-mysid-icl53f.zip

20. So you know, steps 17 (flashing the cdma radio) and step 19 (flashing the update image) took longer than the rest so don't freak out - just be patient. If you did the steps in the proper order after entering the last command your phone should reboot on its own and be completely "fresh". If you made mistakes (like I did the first time) and flashed the radios out of order (like I did) or did not wait long enough for an "Okay" dialogue (like I did) then when you reboot you will have no signal and no phone number and you will have to go through the process again and do it right (like I did).

Hope this helps someone.


----------



## jackstraw (Jun 10, 2011)

rdubb said:


> You can solve the CWM problem by just using root explorer find your system/recovery-from-boot.p. just rename it to 1recovery-from-boot.p- you could probably just delete it but this is how I fixed it.


I had same problem, and it was a simple fix. See above instructions


----------



## wideopn11 (Aug 1, 2011)

Good write up, very detailed. Since Odin works for this phone could we just place the .tar in PDA and flash that way? I have a Fascinate and always used that method to revert to stock when switching between CM7 and ICS alpha builds.


----------



## thepolishguy (Jun 6, 2011)

wideopn11 said:


> Good write up, very detailed. Since Odin works for this phone could we just place the .tar in PDA and flash that way? I have a Fascinate and always used that method to revert to stock when switching between CM7 and ICS alpha builds.


I would like to know the answer to that as well. It sure would be easy.


----------



## retsik (Sep 26, 2011)

wideopn11 said:


> Good write up, very detailed. Since Odin works for this phone could we just place the .tar in PDA and flash that way? I have a Fascinate and always used that method to revert to stock when switching between CM7 and ICS alpha builds.


Yes, you can. See here: http://rootzwiki.com/topic/12592-odin-icl53f-no-wipe-no-recovery-no-bootloaders/


----------

