RE-recovery-img
From CyanogenMod Wiki
Contents |
[edit] Stuck on ADP1/ION after trying to upgrade to 4.1.99+?
The ADP image has replaced your custom recovery image, hence preventing the flash of updates from SD card, needed if you want to flash custom ROMs. In order to flash updates from the SD card in recovery mode, this article will guide you through the necessary steps. NOTE: You can not brick your phone by flashing a recovery image.
[edit] Original SPL
If you still have the Original SPL (you would know if you don't), follow these instructions
[edit] Requirements
First, make sure you have the latest Android SDK installed.
Remember, when you install the drivers, turn off Debugging in System -> Applications -> Development -> clear the checkbox: USB debugging.
[edit] Grab the Recovery image
Next steps guide you through the process of restoring your custom recovery image. Choose either of the following:
[edit] Cyanogenmod's Recovery
Latest version is 1.4 and made for dream. If you have a device with physical keyboard, you may be comfortable with this one.
[edit] Amon_RA's recovery
This is the recommended Recovery Image It will work on the Dream, Magic, or Nexus One just be sure to download the right one for your device. It is optimized for devices with no physical keyboard, when the trackball is the only option from the device. Shell access is still possible: Drop to console if you have physical keyboard, or use ADB through USB connection, if you have no physical keyboard. Now with sub-menus.
If you have a Rogers Dream with an EBI1 (3.22.xx) radio be sure to use the one with a "R" at the end (recovery-RA-dream-vx.x.xR.img. If you have the EBI0 radio (2.22.19.26I) just use the regular recovery image.
[edit] Copy image to SD
Place the file of your choice on your SD card
Due to loosing your custom recovery image, you will probably not be able to use the adb shell. The easiest way to get the recovery.img on the sd card is to use an SD card reader.
If you do not have access to an SD card reader, the following suggestions may be useful:
- Note that "adb push recovery.img /sdcard" might not work. However, it may work if you trigger and explicit sync. After doing the"adb push..", type "adb shell sync" in command prompt, and push Enter.
- Download it with the browser, and using a file-browser move it to the root of your SD card. Rename it to "recovery.img", for simplicity.
[edit] flash_image.zip
Download the flash_image tool
Next, place the file on your desktop
- Change the directory to where "flash_image" is located, e.g. in Windows and Liunux: cd C:\<path-to-flash_image-location>, on a Mac: (edit me) )
[edit] Restoring the custom recovery image
IMPORTANT: Turn on USB debugging. Settings -> Applications -> Development -> check the box "USB Debugging"
- Open up and adb shell
- With your phone booted, type the following commands:
adb root
This will start ADB as root, or notify if it is already running as root.
adb remount This will mount the system partition (/system) as writable, allowing the following
adb push flash_image /system/bin
This will send the flash_image script into the /system/bin, so we can use it from within the shell
adb shell chmod 0755 /system/bin/flash_image Finally, change the permissions of the script to allow it to perform the desired action.
- Now that the script is installed, we are ready to proceed with flashing the custom recovery, saved on the root of the SD card earlier:
adb shell flash_image recovery /sdcard/recovery.img
If you receive an error, join us in the IRC channel (irc.freenode.net #cyanogenmod
- If all is well, reboot into the recovery you just flashed, by holding Home and Power. Wipe. If you don't wipe after having booted into 1.6 dev image, you'll run into errors with cyanogenmod 4.1.99+ like apps not being fully functional.
-
You should now be able to update your firmware with the CyanogenMod releases beyond 4.1.99.
[edit] If you currently have an engineering or a Hard SPL
In case you have flashed an engineering SPL to your device, you may follow this procedure to flash your custom recovery back.
[edit] Requirements
- Android SDK installed, and environment variables set for ease of use.
- The fastboot binary in /tools in the SDK directory.
- Correct USB drivers for your Android phone
- Engineering SPL flashed on your phone. This will allow you to flash the recovery image from the bootloader.
- Downloaded recovery.img (see previous section for instructions on choosing and downloading the image)
In this procedure, we will flash the recovery image using FASTBOOT through shell/prompt, and your device connected to the computer via the USB port.
The following assumes that:
- Recovery image name is recovery.img.
- You type the commands provided bellow without quotation marks.
- You have the basic knowledge of your OS, and can run terminal in Unix/Linux, or Command prompt in Windows.
[edit] Procedure
- Turn your phone off. Turn it on by holding Back and Power, or Vol. down and Power. Either way, boot into the bootloader.
- You should see the three Androids on skateboards, and the menu title should say "Fastboot".
- Connect your device to the computer. The display on your phone should now say "Fastboot USB".
- Open up the shell/terminal on your computer, and type
fastboot devices [enter]Your device should be listed with it's serial number, and should say "fastboot". - Change directory to where you have saved your recovery image. I.e. type "cd /path/to/recovery.img in windows prompt, press enter.
- You may issue a "dir" command (Windows) or "ls" (Unix/Linux) to make sure you are at the right directory, or just skip this step.
- Type
fastboot flash recovery recovery.img [enter]
Check your phone's display, as recovery is being sent and flashed to your device.
Check your command prompt/shell to make sure the process is over.
[edit] Check your work
Reboot into recovery by holding Home and Power.
- If you see options to do various things, like flash an update.zip, or perform a nandroid backup, you are good to go.
- Make sure you wipe before flashing CM 4.1.9***, and happy flashing!
[edit] Troubleshooting=
If you can not flash the recovery from fastboot, you will have probably received a message about it, back at the step 6.
- This means that your SPL does not allow flashing from fastboot. If you are willing toflash another SPL and give it a try, do so, but be very carefull, because flashing SPL incorrectly is the most famous method of bricking your phone. Proceed at your own risk, and do a search on the topic in this Wiki,XDA developers, Android Community, or other community websites.
- If this method fails, try the first method that does not require flashing of an SPL.
-
If you get a success message, but for some reason can not boot into recovery, boot into the bootloader again (steps 1, 2, 3). Try booting the recovery image, without a flash:
- In the command prompt/shell type "fastboot boot recovery.img".
- Check your device. It should reboot, and take you straight into recovery. If this works, then you can try flashing it again, following the 6 steps above.
