Bootloader and recovery are two essential components of an Operating System. They let you gain control over an operating system. Hence they are hidden by default and a common user rarely uses them. But if you to learn and experiment on Android OS, we should use them very often and it is important to learn about them.
A bootloader is the first piece of OS, that runs when you turn on a device. It decides whether to load Android or Recovery. In a normal Boot, it loads the Android.So by entering bootloader menu, users will be able to choose between booting options. Also, Bootloader/ Fastboot is only where ADB and Fastboot commands work.
But, as Android is Open source Operating System (Which can be modified by Anyone) every device maker has their own version/style of the bootloader. As a result, the look and options of bootloader will differ from device to device. The bootloader of your device can be accessed using ADB command or Specific key combinations.
Once your device is in fastboot/Bootloader menu, Fastboot commands come into effect. Few Fast boot commands and their outputs in Bootloader menu are mentioned below. You need ADB and Fastboot on your PC in order to execute these commands,
- To know the details of Connected devices – fastboot devices
- To flash a recovery image (name the recovery to twrp.img) – fastboot flash recovery twrp.img
- To erase cache – fastboot erase cache
- To reboot the connected device into Android system – fasboot reboot
Simply, Recovery is a mini operating system separate from Android to perform various system-related tasks. It is like controlling the functionalities of a major operating system with help of mini operating system.
Recovery, that comes preloaded with your device by your device manufacturer is called as Stock Recovery. It can be accessed using specific key combinations or ADB commands. The stock recovery on Android devices will only able to apply OTA (over-the-air) updates, delete user and cache content (factory reset purposes) and nothing more. The stock recoveries are limited for the sake of making sure that you don’t mesh up with Android operating system.
Few common we may see in Recovery
- reboot system now.
- apply update using ADB.
- apply update from SD card.
- wipe cache partition.
- wipe data/factory reset.
And a Custom Recovery? It is a custom built recovery which can replace the stock recovery to simply our things. Custom recovery comes with modified Touch User interface and has additional options like installing zip files and Backup of ROMs.
Unlocking of Bootloader and Custom Recovery:
As a security measure, the bootloader is usually locked on an Android device to avoid unnecessary modifications to important system files. Flashing a custom recovery replaces the stock recovery resulting in alteration of system files. So, Every user must unlock their device bootloader before flashing a custom recovery.
Custom Recovery: As the name implies, it is a custom made Android recovery with abilities for easy flashing and backing up of the ROMs/system files.
TWRP is a well-known custom recovery in the world of Android. TWRP comes with an ability to install third-party Custom ROMs, to perform Nandroid and Titanium backups (these are very good backups that saves literally everything from your personal data to the operating system itself). In a story short, Custom recoveries allow you to do things that the manufacturer never want you to do. Visit Official Website of TWRP to know if TWRP is available for your device.