⚠️ Attention: You perform all the actions described in this article at your own peril and risk. Incorrect installation of the firmware can lead to complete failure of the device without the possibility of recovery. The author is not responsible for damaged equipment.

Installing an operating system Android on a phone from scratch is a complex technical process that may be required in case of serious software failures, a desire to get the latest version of the OS that is not officially available, or when restoring a “bricked” device. Unlike a simple over-the-air update, a complete reinstallation requires a deep intervention in the smartphone’s memory structure and requires preliminary preparation of special tools.

Before taking active steps, you need to clearly understand the difference between resetting the settings and a complete flashing. If your phone is simply slow or glitchy, it is often enough to do Hard Reset through the recovery menu. However, if the system does not boot at all, reboots cyclically, or you want to change the device region, you will need to install a new system image. This process erases absolutely all data, including hidden partitions, so (backup) is a critical first step.

It is also important to realize that there is no universal “Install Android” button. For each manufacturer, be it Samsung, Xiaomi, OnePlus or Google Pixel, there are unique tools, drivers and methods for entering the device into firmware mode. An attempt to use software from one brand on the device of another will with a 99% probability lead to irreversible consequences. Therefore, in this guide we will look at the general principles and algorithms that apply to most modern smartphones.

Preparing tools and backing up data

Getting started requires careful preparation of the workplace and software. You will need a computer with an operating system Windows (less often macOS or Linux), a working USB cable, preferably the original one, and a stable Internet connection to download the firmware files. The first step is to create a complete backup of all important data: contacts, photos, messages and documents. Remember that the process of installing a new system (formats) the internal memory of the device.

To save information, you can use cloud services, such as Google Drive or Yandex.Disk, or copy the files directly to your computer's hard drive. Pay special attention to saving folders DCIM, Download and Documents. It is also recommended to export the list of installed applications and their data, if possible, although after a clean installation the apps will have to be downloaded again from the store Google Play.

The next step is installing the necessary drivers. Without the correct drivers, the computer will not be able to recognize the phone in specialized modes, such as Fastboot or Download Mode. Processor-based devices often require Qualcomm HS-USB QDLoader drivers, and VCOM drivers are often required for processor-based devices. Universal drivers Qualcomm Qualcomm HS-USB QDLoader drivers are often required, and for MediaTek - VCOM drivers. Universal drivers Google USB Driver can also be useful, but manufacturer-specific drivers are always preferable.

⚠️ Attention: app interfaces for firmware and names of boot modes may differ depending on the Android version and device model. Before starting work, check the current requirements for your specific model on the official developer forum or the manufacturer’s website.

Finally, make sure that the smartphone battery is charged at least 60-70%. The firmware process can take from 10 minutes to an hour, and a sudden power outage at a critical moment of writing data to memory can turn the phone into a “brick.” If the battery is non-removable and the device does not turn on, try connecting it to the charger for 30-40 minutes before trying to enter recovery mode.

📊 What is your main goal of flashing?
Recovering after a failure
Getting a new version of Android
Removing adware
Experiments with custom firmware

Unlocking the bootloader and obtaining access rights

Most modern smartphones come with a locked bootloader (Bootloader). This is a security mechanism that prevents installation of unverified software. To install Android from scratch, especially if you are using a custom Recovery or unofficial firmware, the bootloader must be unlocked. This process almost always completely erases all data on the device, so make sure you've already made a backup.

The unlocking mode most often used is Fastboot. To enter it, you usually need to turn off the phone and hold down a combination of buttons, for example Volume Down + Power. Once you connect your device to your PC, you can send a command through the terminal. On a computer with installed ADB i Fastboot enter the following instructions:

fastboot oem unlock

Or, for some devices:

fastboot flashing unlock

After entering the command, a warning about data loss and risks will appear on the phone screen. Confirmation of the action is usually carried out using the volume buttons. It is worth noting that some manufacturers, such as Huawei or operator versions Verizon in the USA, can completely block the ability to unlock the bootloader, making the installation of third-party systems impossible.

It is worth mentioning separately about superuser rights (Root). Although root access is not required for a clean installation of stock Android, many enthusiasts obtain them to deep clean the system before flashing the firmware. However, getting Root often requires an already unlocked bootloader and installation of a custom Recovery, such as TWRP. If your goal is simply to return the phone to its factory state, obtaining superuser rights may be an unnecessary step that will complicate the warranty.

What is OEM unlocking in the settings?

In the “For Developers” menu there is an “OEM unlocking” item. If it is locked (gray) and inactive, this means that the device is either already unlocked, or the manufacturer has imposed a hardware ban on this procedure, or the phone is listed as stolen (for some brands). Without activating this item, you will not be able to unlock the bootloader using software methods.

Selecting the type of firmware and download sources

The key point in the process is choosing the correct system image. Incorrect selection of the firmware file is the most common cause of failure. Firmware is divided into several main types: stock (official), custom (for example LineageOS, Pixel Experience) and recovery (Stock Recovery images). Stock firmware provides maximum stability and preservation of all functions of the device, while custom firmware offers a clean interface and new versions of Android for old devices.

There are many sources for downloading, but you should trust only proven resources. Official websites of manufacturers often provide recovery utilities, such as Mi Flash Tool for Xiaomi or Odin for Samsung. To search for specific models and software versions, an excellent resource is the forum 4PDA or XDA Developers. There you will find not only files, but also detailed instructions adapted for a specific hardware revision.

When downloading, pay attention to the following parameters:

  • 📱 Device model: Firmware for Redmi Note 10 is not suitable for Redmi Note 10 Pro, even if they look the same.
  • 🌍 Region: The Global version (Global) differs from the Chinese (CN) version in the presence of Google services and language support. Chinese firmware often requires additional modification.
  • 🔢 Android version: Make sure the firmware version is compatible with your current bootloader partition. Sometimes a gradual update is required (for example, from 10 to 11, then to 12) to avoid modem compatibility errors.

The format of the firmware files also matters. Different archives are used for different tools: .zip for installation via Recovery, .tar or .tar.md5 for Odin, .pb for Qualcomm and images .img for Fastboot. Never try to unpack the firmware archive unless the instructions explicitly require it. Often, the archive already contains a script that automatically distributes files among memory sections.

💡

Always check the checksum (MD5 or SHA1) of the downloaded firmware file. If the amount does not match that indicated on the developer’s website, the file could be damaged during downloading, and its use is dangerous for the device.

Installation via Recovery mode (Stock and Custom)

Recovery mode is a special environment built into the phone that allows you to reset data, install updates and clear the cache. There are two types of Recovery: stock (from the manufacturer) and custom (for example TWRP). Stock Recovery has limited functionality and usually allows you to install only official signed updates in the format .zip. Custom Recovery gives you access to installing any images, creating full backups (Nandroid) and working with the file system.

If you already have custom Recovery installed, the process of installing Android from scratch is as follows. First, copy the firmware file (usually an archive .zip) to the phone's internal memory or SD card. Then reboot the device into Recovery mode by holding down the key combination (often Volume Up + Power). In the menu TWRP first of all, you need to clear the data.

For a clean installation, it is recommended to format the Data section. In the menu Wipe select Advanced Wipe and tick the sections Dalvik / ART Cache, System, Data and Cache. Do not touch the partition Internal Storageif the firmware file is on it, otherwise you will not be able to install it. Swipe to confirm cleaning. After that, return to the main menu, select Install, specify the firmware file and confirm installation with a swipe.

Action Stock Recovery TWRP (Custom)
Installing ZIP Only signed OTA Any compatible ZIP
Cleaning partitions Factory Reset only Custom (System, Data, Cache)
System backup Not available Full image (Nandroid)
Working with files No access File Manager (MT)

After the installation process is completed, which may take several minutes, a button Reboot Systemwill appear. Before the first boot, the system may optimize applications, which takes time. If the installation was successful, you will see the initial Android setup screen. If errors occur (for example Status 7), most likely the Recovery version is outdated or the firmware is not intended for this model.

☑️ Checklist before flashing the firmware via Recovery

Done: 0 / 5

Firmware via computer: Fastboot and specialized software

When the phone does not boot even into Recovery or a complete replacement of all memory partitions is required, the flashing method via a computer is used. For devices running pure Android or Xiaomi the main tool is the utility Fastboot. It allows you to send commands directly to the bootloader, writing partition images (boot.img, system.img, recovery.img) directly into memory. This method is considered one of the most reliable.

To use Fastboot, the phone must be switched to the appropriate mode (usually the screen turns black with an Android image or Fastboot text). On your computer, you need to unpack the firmware files into one folder, where the executable files adb.exe and fastboot.exeare also located. You can open the command line in this folder by holding Shift and right-clicking, selecting "Open a PowerShell window here" or "Open Command Prompt."

The firmware process can be automated by a script that often comes bundled with factory images (files flash-all.bat for Windows or flash-all.sh for Linux/Mac). Running such a script automatically clears memory and writes all necessary images. If you are flashing manually, the command for writing the main partition of the system looks like this:

fastboot flash system system.img

For devices Samsung a completely different ecosystem is used. Here the de facto standard is the app Odin. Unlike Fastboot, Odin works with files of the .tar format and requires the phone to be switched to Download Mode (combination Volume Down + Volume Up + Cable connection). In the Odin interface, files are distributed into slots: BL (Bootloader), AP (System), CP (Modem) and CSC (Region/Data). It is important to choose the right CSC file: using a file HOME_CSC will save the user's data, and using a regular one CSC will delete them completely.

⚠️ Attention: When using tools like Odin or SP Flash Tool Never disconnect the USB cable until the green “PASS” or “OK” status appears. Interrupting writing to the bootloader (BL) partition is guaranteed to disable the device.

Devices on processors MediaTek are often flashed through the utility SP Flash Tool. This tool allows you to work with your phone even when it is turned off (BROM mode), which saves you in case of serious breakdowns. However, it is critical to choose the right dispersion file (scatter.txt) and firmware mode. The mode Download Only is safe, while Format All + Download can erase the unique device identifier (IMEI), which is extremely difficult to restore.

💡

Using the manufacturer's official tools (Odin, Mi Flash, SP Flash Tool) is always safer than trying to flash the device with universal utilities, since they take into account the specifics of the memory layout of a specific model.

Initial setup and solving possible problems

After a successful reboot, the initial setup stage begins. The setup wizard will prompt you to select a language, connect to Wi-Fi and log in to your account Google. At this stage, protection FRP (Factory Reset Protection) may work. If you reset your phone without logging out of your Google account first, the system will require you to enter the password for the last synchronized account. This is a security measure against theft that cannot be bypassed by legal methods without the owner's data.

If after installing Android the phone is unstable, artifacts are observed on the screen or constant reboots, the partition may have been damaged Data or there is a version conflict. In this case, it is recommended to repeat the procedure, but at the Recovery stage select the item Format Data (enter word yes), which will perform deep formatting of the user partition. It is also worth checking whether the version corresponds Radio/Modem to the system version. Modem incompatibility can lead to a lack of network or non-functioning GPS.

Another common problem is the “bootlap” (cyclic reboot). If the phone gets stuck on the boot logo for more than 10 minutes, go to Recovery again and do Wipe Cache Partition i Wipe Dalvik Cache. If this does not help, perhaps the firmware itself is broken or is not suitable for your board revision. In this case, the only way out is to look for another version of the software or return to the old working firmware.

After successfully logging in, do not rush to install all applications in a row. Let your phone run in the background for about an hour to complete file indexing and database optimization. Check the operation of the main modules: camera, microphone, sensor, Bluetooth and Wi-Fi. Only after making sure that it is fully operational can you begin restoring data from a backup.

Why does the fingerprint not work after flashing the firmware?

On many modern smartphones, the fingerprint sensor is tied to unique keys in the persist or userdata section. During a complete flashing with an unlocked bootloader, these keys may be lost or become invalid. Restoring the fingerprint scanner in such cases is often impossible without resoldering the chips or using special engineering backups.

Questions and answers (FAQ)

Is it possible to install Android from scratch without a computer?

In most cases, no. For a complete flashing (“from scratch”), a computer is required to transfer the system image files and control the recording process. However, if the phone boots, you can try installing the update through the built-in Recovery menu, using the firmware file downloaded directly to the phone's memory card.

What to do if the computer does not see the phone in Fastboot mode?

Check the USB cable (try another one), install or reinstall the ADB/Fastboot drivers. Try another USB port, preferably USB 2.0, located directly on the motherboard (at the back of the system unit), and not on the front panel or through a hub.

Will installing Android delete my photos and contacts?

Yes, completely installing the system from scratch involves formatting the data partition. All photos, contacts, applications and files will be permanently deleted. The exception is installation via Download mode on Samsung using the HOME_CSC file, but this is not considered a “from scratch” installation in its pure form.

Is it dangerous to install custom firmware instead of the official one?

This carries certain risks. Custom firmware may contain errors, do not support some hardware functions (camera, NFC) and often do not have Google security certificates (SafetyNet), which can interfere with the operation of banking applications. However, they allow you to extend the life of older devices.

How to return the warranty after unlocking the bootloader?

In fact, unlocking the bootloader automatically voids the warranty from most manufacturers. Even if you block it back, in the phone’s service logs (Knox counter on Samsung, for example), there will be a record of interference, which the service center can easily detect.