.
Why would you need to restore the stock recovery? To be able to successfully install an over-the-air (OTA) Android update from Google or your carrier.
Note: if, when you installed ClockworkMod custom recovery, you renamed your /system/recovery-from-boot.p file to make ClockworkMod "stick", you should be able to rename it back to its original name and then reboot to cause the stock recovery to be automatically re-flashed for you.
Many of the details that you would need to follow are already covered in the
How to restore stock recovery post (please reference that post for additional details). However, you really only have one file to enter a fastboot flash command for to return your recovery back to stock. Here's an overview:
- acquire the stock recovery image, by either:
- download the appropriate 4.0.2 stock recovery images for each device:
stock-GSM-HSPA-402-recovery-image.zip (contains recovery.img file)
- - download the proper stock image file (<model>-<version>-factory-<hex code>.tgz) for your partition device to your PC
- extract the stock image file to a working directory
- extract the contents of the image-<model>-<version>.zip file to a working directory
- copy the recovery.img file from the extracted image-<model>-<version>.zip file to the directory that contains your fastboot utility (note: we're assuming you already have fastboot USB connectivity between your phone and your PC)
- start-up a terminal/command session (i.e., Windows Command Prompt for MS/Windows, or a Terminal session for Mac/Linux)
- put your phone into
fastboot / bootloader mode
- type the following
fastboot command to flash the stock recovery:
Code:
fastboot flash recovery recovery.img
(the name of your particular fastboot command may differ based on the type of PC you are running on (i.e., it might be "fastboot-windows.exe" for MS/Windows or "./fastboot-mac" for Mac or "./fastboot-linux" for Linux)
- that's it...you should now have your stock recovery again
- to reboot your phone, you can type
fastboot reboot to restart Android