Every now and then I flash CyanogenMod on an Android device and as there are usually weeks or months between two sessions I frequently have to look up the instructions again. To complicate matters, the procedure for flashing an alternative Android on a device also depends on the device manufacturer. Altogether a very confusing procedure if you don't do it all the time. But things get much simpler once one has understood what lies at the core of the different procedures and all the steps required.
The Recovery Partition
No matter how different the procedures are, the core is always the same: When Android starts, the bootloader on any device has several choices it can make. Usually, the bootloader just boots Android. Some manufacturers have included a proprietary flashing software that the bootloader can run instead of starting Android when the user presses a certain key combination during power up. This is proprietary, however, and is not directly related to Android. And finally, the bootloader can also start the software in Android's recovery partition. And this recovery partition is what is used on all devices to install an alternative ROM from a zip file that contains the complete Android installation.
Software For The Recovery Partition
So the first trick is to get an alternative recovery software on the recovery partition. A well known alternative recovery software is Clockworkmod (CWM). This is the key in all flashing procedures I have come across so far. Exactly how this is can be achieved depends on the device and manufacturer and procedures vary wildly. I'll give a couple of examples below. For now, the key thing to remember is that an alternative recovery software such as CWM has to end up in the recovery partition in some way.
Getting The Alternative Android Software On The Device
Once the recovery software is on the recovery partition it can then be used to flash the alternative Android system into the system partition. Before that is done the device has to be wiped with the recovery software as configuration settings of the 'old' Android system might not be compatible with the new system. The second big task in flashing a new Android system is to get the zip file that contains the new Android system into the device so the recovery software can flash it. The easiest variant is to put it on a removable memory card. Another variant some devices support is to upload the ZIP file to the data partition of the device over USB while it is in recovery mode. One way or another, once the Android system ZIP file is on the device the alternative recovery software (e.g. CWM) is then used to install it. In the case of CyanogenMod I usually also transfer a second ZIP file to the device that contains a part of the Google software to be able to access the Play store. Transferring and flashing the second ZIP file works the same way as for the main Android system ZIP file.
So Why Are The Procedures Different For Different Device Manufacturers?
So far so good. In practice, however, different manufacturers have chosen different ways to configure the different Android storage partitions and startup procedures. Also, some companies such as Sony, for example, lock the bootloader and won't allow an alternative software on the recovery partition before the bootloader is unlocked. This is done via a code that can be obtained from their unlock website. The Samsung devices I have flashed so far do not require this step, their boot loaders are open. However, there seem to be some US network operators that have the bootloader of their device variants locked. On Sony devices the recovery software has to be sideloaded via Android debug tools. On Samsung devices, Samsung specific tools are required. And, not to forget, the key combinations to make the phone boot into the flashing software in Samsung's case or the recovery partition are also different on a device and manufacturer basis. Just like the keys to enter a PC's BIOS settings…
But in the end, all these different procedures have one goal: To get an alternative recovery software on Android's recovery partition. Keeping that in mind and the confusing multistage instructions of how to do that might seem a little bit less confusing.
What about the performance on CyanogenMod? Do all the hardware devices properly? Are there any software bugs?