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.
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:
- Activate
Developer mode(7 taps on build number inAbout the phone). - Enable
OEM Unlockin the developer menu. - 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:
- Unpack the firmware into a folder with
platform-tools(there should be filesboot.img,system.imgetc.). - Set the device into mode
Fastboot:adb reboot bootloader - Flash each partition in turn (example for Pixel):
fastboot flash boot boot.imgfastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash --slot=all dtbo dtbo.img - Clear the cache:
fastboot erase cache - 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:
- Download the firmware in format
.zipand place it on an SD card or internal memory. - Boot into
TWRP(usuallyPower + Vol Up). - Make a backup of the current system (
Backup โ Select Partitions). - Click
Install, select the ZIP file and confirm the installation. - 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:
- Go to
Settings โ System โ System update. - Click
Check for updates. - If an update is available, confirm the download (Wi-Fi required).
- After downloading, click
Installand 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
.exein 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
Recoveryand clear the cache (Wipe โ Dalvik/ART Cache). - ๐ง If that doesn't help, reflash
boot.imgviaFastboot. - ๐ฑ For Samsung use the combination
Power + Vol Down + Bixbyfor 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,
BLfrom the same version andAPfrom another). - ๐ To reset to factory settings, use
CSC, notHome_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 withFastboot. - ๐ Use script
flash-all.bat(Windows) orflash-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
bootloaderold 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 inZIPbefore 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 unofficialboot.imgmay trigger KNOX (flag0x1), 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
systemorvendor). - ๐ซ Use outdated versions Odin or Fastboot.
- ๐ซ Install firmware from unknown sources (risk malware).
How to restore a device after unsuccessful firmware:
- Soft Brick (the device turns on, but not loading):
- Try to boot into
Recoveryand install the firmware again.- If
Recoveryis missing, useFastbootfor firmwareboot.img. - 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(clickVol 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 RecoveryPC 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 ROMvia the built-in applicationUpdater.
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:
- Through the settings menu:
Settings โ About phone โ Android version / Build number. - Via
ADB:adb shell getprop ro.build.version.incremental