Flashing a smartphone on Android is a process that can either bring the device back to life or turn it into a โ€œbrickโ€ if you approach the matter without preparation. In 2026, the relevance of this topic is only growing: manufacturers are reducing support periods even for flagship models, and custom firmware (like LineageOS or Pixel Experience) allows you to extend the life of a gadget by 2-3 years. But how not to make a mistake when choosing software? How to avoid installation errors? And what to do if something went wrong?

This article will not just list firmware methods - it will explain which method is suitable for your situationhow to prepare the device to minimize risks, and what to do if after the update the smartphone stops booting. We will look at three main methods: via Fastboot, Recovery and standard OTA update, and also provide a checklist for checking the compatibility of the firmware with your model. We will pay special attention to Google's new restrictions on unlocking the bootloader in Android 14+which may block access to some functions even after successful firmware.

We warn you right away: if you have never worked with ADB or Fastboot, it is better to start with automated tools like Odin (for Samsung) or Xiaomi Flash Tool. For experienced users, we will reveal the nuances of manual firmware, including working with payload.bin and patching boot.img for Magisk.

๐Ÿ“Š Why do you want to flash Android?
Install custom firmware
Return stock after a failure
Update Android version
Eliminate bugs
Other

1. Preparing the device: 5 mandatory steps before flashing

Even the most reliable firmware can lead to problems if preliminary steps are not taken. At this stage, many people make a critical mistake - they skip the backup or do not check file compatibility. Let's look at it in order:

Step 1. Checking the model and bootloader version. Firmware for Samsung Galaxy S23 Ultra (SM-S918B) will not be suitable for SM-S918U, even if the difference is only in the region. You can find out the exact model in Settings โ†’ About phone โ†’ Model or through the command:

adb shell getprop ro.product.model

Step 2. Unlocking the bootloader (if required). On most devices (except Google Pixel and some Xiaomis) this leads to Full data reset. To unlock:

  1. Activate Developer mode (7 taps on build number in About the phone).
  2. Enable OEM Unlock in the developer menu.
  3. Connect the device to the PC and do:
    fastboot flashing unlock

Make a backup of data (photos, contacts, SMS)

Check battery charge (minimum 50%)

Download the correct firmware version for your model

Install ADB/Fastboot drivers on your PC

Disable antivirus (may block firmware files)-->

Step 3. Backup. Use TWRP (if installed) or apps like Swift Backup to save applications and data. For a full system backup, the following command is suitable:

adb backup -apk -obb -shared -all -f backup.ab

Step 4. Checking file integrity. The downloaded firmware may be damaged. For ZIP archives, use hash verification (for example, through 7-Zip), for payload.bin - utility Payload Dumper.

Step 5. Preparing tools. Depending on the firmware method, you will need:

  • ๐Ÿ”ง Platform Tools (ADB/Fastboot) from Google
  • ๐Ÿ“ฑ Drivers for your device (for example, Samsung USB Driver)
  • ๐Ÿ’พ Utilities for unpacking firmware (Odin, Mi Flash Tool)
  • ๐Ÿ”„ Backup apps (Titanium Backup, Migrate)
โš ๏ธ Attention: Starting from Android 13, some manufacturers (for example, Xiaomi and Oppo) block bootloader unlocking on new devices without linking an account. Check the rules for your model at official website.

2. Method 1: Firmware via Fastboot (for stock and custom software)

Fastboot โ€”the most universal method, supported by most Android devices. It allows you to upload firmware directly to the memory section, bypassing Recovery. This method is suitable for:

  • ๐Ÿ“ฑ Installing official firmware (for example, factory images for Google Pixel)
  • ๐Ÿ”ง Restoring a device after a failure (โ€œbrickedโ€)
  • ๐Ÿ› ๏ธ Installations custom firmware with pre-patched boot.img

Step-by-step guide:

  1. Unpack the firmware into a folder with platform-tools (there should be files boot.img, system.img etc.).
  2. Set the device into mode Fastboot:
    adb reboot bootloader
  3. Flash each partition in turn (example for Pixel):
    fastboot flash boot boot.img
    

    fastboot flash system system.img

    fastboot flash vendor vendor.img

    fastboot flash --slot=all dtbo dtbo.img

  4. Clear the cache:
    fastboot erase cache
  5. Reboot the device:
    fastboot reboot

For devices with dynamic partitions (for example, Samsung Exynos or OnePlus s Android 10+) use the command:

fastboot update image.zip
Manufacturer Fastboot Features Recommended utility
Google Pixel Supports fastboot update for full images Official factory images
Xiaomi Requires account authorization to unlock Mi Flash Tool
Samsung Fastboot not supported, use Odin Odin3
OnePlus Supports fastboot boot for temporary boot MSM Download Tool
fastboot flash system system.img --disable-verity

This will disable integrity checking (but reduce security!).-->

Common errors and solutions:

  • ๐Ÿšซ FAILED (remote: 'Not allowed in Lock State') โ†’ Unlock the bootloader (fastboot flashing unlock).
  • ๐Ÿšซ Invalid sparse file format at header โ†’ Upload the firmware, the file is damaged.
  • ๐Ÿšซ The device is not detected โ†’ Check the drivers or try another USB port (preferably USB 2.0).
โš ๏ธ Attention: On devices with Android 14+ i AVB 2.0 (for example Pixel 8) unpatched firmware boot.img will lead to a hang on the logo. Use Magisk for patching before installation.

3. Method 2: Installation via Recovery (TWRP/Stock Recovery)

Firmware via Recovery is convenient for installing custom ZIP archives (for example, LineageOS or GApps). before installation. However stock Recovery (from the manufacturer) usually only supports official updates.

How to flash via TWRP:

  1. Download the firmware in format .zip and place it on an SD card or internal memory.
  2. Boot into TWRP (usually Power + Vol Up).
  3. Make a backup of the current system (Backup โ†’ Select Partitions).
  4. Click Install, select the ZIP file and confirm the installation.
  5. After completion, perform Wipe โ†’ Format Data (if a clean installation is required).

Features of stock Recovery:

  • ๐Ÿ”„ Supports only official updates (for example, OTA for Samsung or Xiaomi).
  • ๐Ÿšซ Does not allow installing custom firmware.
  • ๐Ÿ“ฅ Updates are usually downloaded automatically to background.
What to do if TWRP does not see the internal memory?

If TWRP does not display files in the internal memory, the reason may be encryption FBE (File-Based Encryption). data-i="168">1. Copy the ZIP to the SD card.

1. Copy the ZIP to your SD card.

2. Use ADB Sideload:

adb sideload rom.zip

3. Format Data (erases all data!).

Advantages and disadvantages of the method:

Pros Cons
โœ… Simple interface (suitable for beginners) โŒ Limited functionality in stock Recovery
โœ… Possibility of backup before flashing โŒ Not all firmware supports installation via ZIP
โœ… Works even without a PC โŒ Risk of "brick" when interrupting the process
๐Ÿ’ก

For devices with Dynamic Partitions (for example, Pixel 3 XL and newer) use firmware in the format payload.bin and unpack them via Payload Dumper before installing via Fastboot.

4. Method 3: OTA update (the safest method)

Over-the-air update (Over-The-Air) is the most reliable method, since the firmware is tested for compatibility with the device. However, it is only suitable for official updates and does not allow you to install custom software.

How to run an OTA update:

  1. Go to Settings โ†’ System โ†’ System update.
  2. Click Check for updates.
  3. If an update is available, confirm the download (Wi-Fi required).
  4. After downloading, click Install and wait for the reboot.

What to do if OTA does not arrive?

  • ๐Ÿ”„ Forced verification: Use the command:
    adb shell cmd jobscheduler run -f com.android.server.telecom 999

    (does not work on all devices).

  • ๐Ÿ“ฅ Manual download: Download the full OTA package for your model from the manufacturerโ€™s website (for example Google or Xiaomi) and install via Stock Recovery.
  • ๐Ÿ”ง Resetting the cache: Sometimes clearing the update cache helps:
    adb shell pm clear com.google.android.gms

OTA restrictions:

  • ๐Ÿšซ Does not work on devices with an unlocked bootloader (for example, Pixel blocks OTA).
  • ๐Ÿšซ Does not allow you to roll back to a previous version of Android.
  • ๐Ÿšซ Can reset settings if majors update (for example, from Android 13 to 14).
โš ๏ธ Attention: On some devices (for example, Samsung Galaxy S22+) forced interruption of the OTA update can lead to blocking of the EFSpartition, which will require flashing via Odin.

5. Selecting firmware: stock vs custom

Not only the functionality of the device, but also its safety depends on the type of firmware. Let's look at the pros and cons of each option:

Stock firmware (official):

  • โœ… Full compatibility with hardware.
  • โœ… Support for OTA updates.
  • โœ… Retention of warranty (if not unlocked bootloader).
  • โŒ Often contains bloatware (pre-installed applications).
  • โŒ Slow updates (especially for budget models).

Custom firmware (LineageOS, Pixel Experience, etc.):

  • โœ… Pure Android without unnecessary applications.
  • โœ… Older devices are supported longer.
  • โœ… Advanced settings (for example, CPU/GPU control).
  • โŒ Possible bugs with the camera, NFC or wireless charging.
  • โŒ No official support (risk of "brick").

Where to download firmware?

Firmware type Source Example
Official (stock) Manufacturer's website Google Factory Images
Custom (AOSP) XDA Developers, LineageOS Wiki XDA
Port from other devices Telegram developer channels Pixel Experience for Redmi Note 10

How to check the firmware for viruses?

  • ๐Ÿ›ก๏ธ Use VirusTotal to check ZIP files.
  • ๐Ÿ” Check the hash (MD5/SHA-1) with the official source.
  • ๐Ÿšซ Avoid files with the extension .exe in the firmware archive.
adb shell su -c "snet check"

If the test fails, install Magisk with module Universal SafetyNet Fix.-->

6. Solving problems after flashing

Even if the flashing was successful, problems may occur. Let's look at typical scenarios and ways to eliminate them:

1. The device does not turn on (bootloop)

  • ๐Ÿ”„ Try booting into Recovery and clear the cache (Wipe โ†’ Dalvik/ART Cache).
  • ๐Ÿ”ง If that doesn't help, reflash boot.img via Fastboot.
  • ๐Ÿ“ฑ For Samsung use the combination Power + Vol Down + Bixby for forced reboot.

2. There is no network or the SIM card does not work

  • ๐Ÿ“ถ Check if the firmware supports your region (for example Global ROM vs China ROM).
  • ๐Ÿ”ง Reflash the partition modem (for Qualcomm):
    fastboot flash modem modem.img
  • ๐Ÿ“ฑ Reset the network settings in Settings โ†’ System โ†’ Reset.

3. Rapid battery drain after flashing

  • ๐Ÿ”‹ Calibrate the battery: completely discharge, then charge to 100% without breaks.
  • ๐Ÿ”ง Check active processes via adb shell dumpsys batterystats.
  • ๐Ÿ“ฑ Install a kernel with optimized power consumption (for example, FrancoKernel).

4. Google services (GApps) do not work

  • ๐Ÿ”„ Reinstall GApps via TWRP (choose the version that matches your Android).
  • ๐Ÿ”ง Clear data Google Play Services:
    adb shell pm clear com.google.android.gms
  • ๐Ÿ“ฑ Check if SafetyNet is blocked (use Magisk for bypass).
What to do if the sensor does not work after the firmware?

This is a typical problem for devices with Synaptics or Goodix touchscreens after installing custom firmware Solutions:

1. Flash the original vendor.img via Fastboot.

2. Install the firmware with the patch for your touchscreen (look at XDA).

3. If the sensor works partially, try calibrating it through the engineering menu (##4636##).

7. Firmware for specific brands: nuances for Samsung, Xiaomi, Google

Each manufacturer makes its own changes to the firmware process. Let's look at the features for popular brands:

Samsung (Odin Mode)

  • ๐Ÿ”ง Use Odin3 (version 3.14.4 and newer).
  • ๐Ÿ“ The firmware usually consists of 4-5 files: AP, BL, CP, CSC.
  • โš ๏ธ Do not mix files from different firmwares (for example, BL from the same version and AP from another).
  • ๐Ÿ”„ To reset to factory settings, use CSC, not Home_CSC.

Xiaomi (Mi Flash Tool)

  • ๐Ÿ”ง Account authorization is required Mi to unlock the bootloader.
  • ๐Ÿ“ There are two types of firmware: Fastboot (for Mi Flash) and Recovery (ZIP).
  • โš ๏ธ On new devices (for example, Redmi Note 12) you may need to wait 7-15 days after binding account.
  • ๐Ÿ”„ To install Global ROM on a Chinese model, use the command:
    fastboot flash all -w

Google Pixel (Fastboot + Factory Images)

  • ๐Ÿ”ง The firmware consists of one file image-*.zip, which is unpacked into the folder with Fastboot.
  • ๐Ÿ“ Use script flash-all.bat (Windows) or flash-all.sh (Linux/Mac).
  • โš ๏ธ On Pixel 6/7/8 you need to disable Verified Boot using the flag --disable-verity.
  • ๐Ÿ”„ To roll back to the previous version of Android you must first flash bootloader old version.

OnePlus / Realme / Oppo

  • ๐Ÿ”ง Use MSM Download Tool to restore after a "brick".
  • ๐Ÿ“ Firmwares are often supplied in the format OZIP (need to be renamed in ZIP before installation).
  • โš ๏ธ On devices with ColorOS 13+ unlocking the bootloader can lead to blocking Widevine L1 (reduced streaming quality).
โš ๏ธ Attention: On devices Samsung Exynos (for example, Galaxy S22 Ultra), the firmware of an unofficial boot.img may trigger KNOX (flag 0x1), which will block Samsung Pay and Secure Folder.

8. Security and risks: how not to turn your phone into a brick

Firmware is always a risk. Even experienced users sometimes encounter problems due to small things. Here's how to minimize the danger:

What NOT to do:

  • ๐Ÿšซ Flash files intended for another model (even if the names are similar).
  • ๐Ÿšซ Interrupt the firmware process (especially at the writing stage system or vendor).
  • ๐Ÿšซ Use outdated versions Odin or Fastboot.
  • ๐Ÿšซ Install firmware from unknown sources (risk malware).

How to restore a device after unsuccessful firmware:

  1. Soft Brick (the device turns on, but not loading):

    - Try to boot into Recovery and install the firmware again.

    - If Recovery is missing, use Fastboot for firmware boot.img.

  2. Hard Brick (the device does not respond to buttons):

    - For Qualcomm: use EDL Mode (9008 port) and QFil.

    - For Mediatek: SP Flash Tool with authorized file auth.

    - For Samsung: Odin in Download Mode (click Vol Up + Vol Down + USB).

How to check if the bootloader is locked after flashing:

fastboot oem device-info

Look for lines Device unlocked: true i Verity disabled: true.

Safety tips:

  • ๐Ÿ”’ Always check SHA-256 hash of the downloaded firmware.
  • ๐Ÿ›ก๏ธ Use Magisk instead SuperSU (the latter is outdated and contains vulnerabilities).
  • ๐Ÿ”ง After flashing, change the password Google (on some devices it may be required FRP unlock).
๐Ÿ’ก

If the device does not work after flashing SafetyNet, and banking applications do not work, install Magisk + modules Universal SafetyNet Fix and MagiskHide Props Config.

FAQ: Answers to frequently asked questions

Is it possible to flash Android without a computer?

Yes, but with reservations:

  • For OTA updates or installation via Stock Recovery PC is not needed.
  • For custom firmware you can use applications like FlashFire (outdated) or TWRP Manager, but this is risky.
  • On some devices (for example, Xiaomi) you can flash Recovery ROM via the built-in application Updater.

However, to unlock the bootloader or work with Fastboot a computer is required.

How to check what firmware is installed on the phone?

There are several ways:

  1. Through the settings menu: Settings โ†’ About phone โ†’ Android version / Build number.
  2. Via ADB:
    adb shell getprop ro.build.version.incremental