Recovery

From Android Wiki
The stock recovery of a Huawei device
ClockWorkMod on a Huawei device

A recovery-system, also known as just the recovery, is the name of a system in android devices to recover from possible system start failures. The system can also be seen as a minimum operating system on Android devices, which can be used to fulfill several tasks, as the creation of backups of single partitions or the installation of a new ROM. Basically, the community differentiates between officially distributed recovery systems from the vendors (such as Samsung or HTC) and community/alternative recovery systems (also known as custom recovery). Most commonly known ones of the latter group are ClockWorkMod and the TeamWin Recovery Project.

Functions

A recovery systems main use case is to recover the system from major software-based failures and defects, e.g. if the Android operating system does not start correctly anymore. The recovery system is saved on a specific partition of the internal storage of the device.

Apart from recovering the device by flashing a new copy of the operating system of the device, it can also be used to install completely new operating systems or updates to the existing one. It's not unusual, that update packages are installed using the recovery system, after they were downloaded as part of the so called OTA update process.

Stock recovery

The device vendors install a customized version of a minimal recovery system on the device. It usually has a very limited scope of functionality and it's main intention is to do automated update installations or to wipe specific partitions of the device.

To overcome this minimalistic function scope, users may be able to install custom recoveries.

Custom recovery

Community developers are also providing alternative recovery systems, called custom recoveries. These systems usually provide a much broader set of functionality, even though some of them are based on the stock recovery. They can be used to freely wipe data from any partition of the device (which can lead in an even more broken system as before, when done by an unexperienced user), or install images on them. The most common alternative recoveries are the TWRP (TeamWin Recovery Project) and the ClockWorkMod recovery.

Unlike most of the stock recoveries, the most recent versions of custom recoveries often support input of the user using the touchscreen, instead of the mechanical volume and power keys.

Flash or boot (test) a recovery

A new recovery system (or the stock recovery back to the device) usually can be flashed using fastboot. The flash command is used in a form such as (windows):

fastboot flash recovery C:\Pfad\zum\Recovery.img

Additionally, in more recent versions of fastboot, the recovery system can also be started once on the device, only. This can be especially useful, if the currently installed recovery is not intended to be replaced or the new system should only be tested if it provides all necessary functionality.

It is also useful in order to create a backup of the currently installed recovery system, if it does not provide functionality to do so on its own.

To temporarily start a recovery system, the fastboot command boot can be used:

fastboot boot C:\Pfad\zum\Recovery.img

As the recovery system is not being installed on the device, a simple restart brings back the currently installed recovery of the system.

See also