Flashing a smartphone via a computer is a process that requires not only technical skills, but also understanding risks. Android 12, despite the release of new versions, it remains a relevant system for many devices, especially budget and middle class ones. Unlike updating โover the airโ (OTA), manual firmware via a PC gives control over the software version, allows you to restore the โbrickโ or install custom firmware with advanced functions.
However, there are pitfalls here: from locking the bootloader (bootloader) to incompatibility of firmware with hardware. For example, firmware from Samsung Galaxy A52 is not suitable for Xiaomi Redmi Note 10, even if both models officially support Android 12. In this article we will analyze the only reliable way to flash firmware via a PC is using the ADB and Fastboot toolswhich works on 90% of devices with an unlocked bootloader.
Before you start, answer two questions for yourself question: Why do you need it (speedup, new features, crash recovery?) and Are you ready? possible data loss or even device failure. If the answers are not obvious, it is better to stop at this stage.
Device preparation: unlocking the bootloader and backup
The first and most critical step is unlocking the bootloader (bootloader). Without this, no firmware will be installed via fastboot. The process is different for different manufacturers:
- ๐ Google Pixel, OnePlus, Xiaomi: unlocking via command
fastboot flashing unlock(requires confirmation on the phone). - ๐ Samsung, Huawei: official unlocking is often impossible without special keys (for example, through a service Samsung Members).
- โ ๏ธ Realme, Oppo: you may need to send a request to the manufacturer indicating the IMEI.
Important: unlocking will reset the device to factory settings. Therefore required make a backup:
- ๐ฑ Contacts, SMS, calls: synchronize with Google Account or export through applications like Swift Backup.
- ๐ท Photo/video: copy to PC or to the cloud (Google Photos, Yandex Disk).
- ๐ฎ Game saves: use the built-in cloud saving functions (for example, in Genshin Impact or Call of Duty Mobile).
โ ๏ธ Attention: On some devices (for example Xiaomi with MIUI), unlocking the bootloader requires linking your account to the device for 72 hours. Check this in advance in the settings developer (Settings โ About phone โ MIUI version - tap 7 times).
Choice of firmware: official vs custom
Not only the functionality, but also the stability of the device depends on the type of firmware. Official firmware (stock ROM) guarantee compatibility with hardware, but often lack new features. Custom (for example, LineageOS, Pixel Experience) add flexibility, but may contain bugs.
| Firmware type | Pros | Cons | Where to download |
|---|---|---|---|
| Official (Stock ROM) | Maximum stability, support for OTA updates, compatibility with manufacturer services (for example, Samsung Knox) | Limited settings, possible bloatware (pre-installed applications) | Official websites (Samsung Firmware, Xiaomi Flash Tool) |
| Custom (AOSP) | Clean Android, advanced settings, regular updates (even for old devices) | Possible bugs with camera, sensors, banking applications (due to lack of certification) | Forum.xda-developers.com, LineageOS.org |
| GSI (Generic System Image) | Universal firmware for devices with Project Treble, support for new versions of Android | Camera modules, NFC, some sensors may not work | GitHub (repositories like phhusson/treble_experimentations) |
For beginners, we recommend starting with official firmware. For example, if your Redmi Note 9 Pro "glitched" after the update, download the latest stable version of MIUI for your model from the site en.miui.com. Custom firmware should only be considered if you are confident in your skills or for devices that the manufacturer has abandoned (for example, Nokia 6.1 with Android 12 from the community).
โ ๏ธ Attention: Firmware from unofficial sources (torrents, telegram channels) may contain malicious code. Always check file hashes (MD5/SHA-1) and reviews on forums.
Before downloading the firmware, check its version. for your region. For example, Samsung releases separate assemblies for Russia (SER), Europe (XXU) and Asia (XSG). A discrepancy can lead to problems with the mobile network.
Installing the necessary tools on a PC
For firmware via a computer you will need:
- ADB and Fastboot โutilities for interacting with Android via the command line. Download Platform Tools from Google (weight ~5 MB).
- USB drivers for your device. For most smartphones, a universal package is suitable Google USB Driver, but for Samsung or MediaTek separate drivers may be required.
- Firmware in format
.zip(for recovery) or.img(for fastboot).
Installation instructions:
- Unpack
platform-toolsto the root of the diskC:\(path should not contain Cyrillic alphabet!). - Connect the phone to the PC in
Fastboot(pressVolume down + Powerwith the device turned off). - Open the command line in folder with
platform-tools(Shift + right mouse button โ "Open PowerShell window here"). - Check the connection with the command:
fastboot devicesIf the device is displayed, the drivers are installed correctly.
โ๏ธ Check before flashing
Step-by-step guide for flashing firmware via Fastboot
This method is suitable for devices with an unlocked bootloader and firmware in the format .img. The example is given for Google Pixel 6, but the steps are similar for most devices (except Samsung โthey have their own protocol Odin).
Step 1. Put the device into Fastboot mode
Turn off the phone. Press and hold data-i="144">for 10 seconds until a screen with a robot and the inscription appears Volume down + Power for 10 seconds until a screen with a robot and the inscription appears Fastboot mode.
Step 2. Unlocking the bootloader (if not done before)
In the command line, enter:
fastboot flashing unlock
fastboot flashing unlock_critical
On phone, confirm unlocking (use the volume buttons to select Unlock, confirm with the power button).
Step 3. Firmware system partitions
Unpack the downloaded firmware (for example, factory-image-gus.zip for Pixel 6) and find the files:
boot.imgโ system kernel;system.imgโ main section;vendor.imgโ drivers and proprietary components;dtbo.imgโ device configuration.
Flash them one by one with the commands:
fastboot flash boot boot.imgfastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash dtbo dtbo.img
Step 4. Clear cache and reboot
Run:
fastboot erase cache
fastboot reboot
The first boot may take up to 10 minutes - do not interrupt the process!
What to do if the device is stuck on the logo?
If after flashing the phone does not boot for more than 15 minutes, try:
1. Go to recovery (Volume up + Power) and do wipe data/factory reset.
2 Repeat the firmware, checking. hash sums of files.
3. If all else fails, flash the stock ROM through an official tool (for example, Mi Flash Tool for Xiaomi).
Solving common errors when flashing
Even if you follow the instructions exactly, errors may occur. common and ways to correct them:
| Error | Cause | Solution |
|---|---|---|
FAILED (remote: 'Flashing is not allowed in Lock State') |
Bootloader is not unlocked | Run fastboot flashing unlock (see Step 2 above) |
No such file or directory |
Wrong path to firmware files | Check that the files .img are in the same folder as fastboot.exe |
Invalid sparse file format at header |
The file is damaged system.img |
Download the firmware and check the hash sum (MD5) |
The device is not detected in fastboot devices |
There are no drivers or the cable is faulty | Install the drivers manually via Device Manager or try another USB port (preferably USB 2.0) |
If after flashing the phone the phone does not turn on or is stuck on the logo, do not panic. In 90% of cases, it helps re-firmware with preliminary formatting of partitions:
fastboot erase system
fastboot erase userdata
โ ๏ธ Attention: On devices with a chipset MediaTek (for example, Redmi Note 8 Pro) firmware may require tool SP Flash Tool instead of fastboot. Check this on the forum 4PDA for your model.
Firmware via custom recovery (TWRP)
An alternative way is to install the firmware via TWRP (Team Win Recovery Project). This method is suitable for .zipfirmware (for example, custom or modified stock ROM).
Advantages of TWRP:
- ๐ Ability to create a full backup of the current system (
Nandroid backup). - ๐ฆ Installing firmware, kernels and mods without a PC (just copy the file to your phone).
- ๐ ๏ธ Recovery after unsuccessful firmware.
How to install TWRP:
- Download the recovery image for your model from official website (for example,
twrp-3.7.0_9-0-redfin.imgfor Pixel 5). - Flash it via fastboot:
fastboot flash recovery twrp.img - Boot into recovery:
fastboot reboot recovery. - In TWRP, select
Install, find the downloaded firmware (.zip) and confirm installation.
Important: after installing custom firmware via TWRP required flash Magisk (for root access) or Disable_Dm-Verity_ForceEncrypt (if you need to disable encryption). Otherwise, the device may get stuck in a loading loop.
TWRP does not support devices with Dynamic Partitions used in Android 10+. For such models (for example Pixel 4 XL), firmware is only possible via fastboot.
Checking firmware and post-configuration
After successful firmware, perform several checks:
- Checking the Android version:
Settings โ About phone โ Android version. Should be displayed Android 12 (API 31). - Testing basic functions:
- ๐ Calls and mobile data (check IMEI in
*#06#). - ๐ท Camera (take a photo on the main and front).
- ๐ Charging (connect the charger).
- ๐ Speakers and microphone (record a voice message).
- ๐ Calls and mobile data (check IMEI in
Magisk with the module Universal SafetyNet Fix.If problems are found (for example, NFC or the fingerprint sensor does not work), return to the original firmware or find an alternative build on the forums. For example, for Samsung Galaxy S21 with a broken NFC, the regional version of the firmware often helps XEU (Europe) instead of SER (Russia).
FAQ: Frequently asked questions about Android 12 firmware
Is it possible to flash Android 12 on a device that does not officially support this version?
Yes, but with reservations. For this you need custom firmware based on Android 12 (for example, LineageOS 19 or ArrowOS). However:
- โ ๏ธ The camera, sensors or mobile network may not work (depending on developer support).
- โก Performance may drop due to an unoptimized kernel.
- ๐ Banking applications will refuse to work without additional patches (for example,
MagiskHide Props Config).
Before installation, check reviews on XDA Developers for your model.
How to return the official firmware after custom?
For a return to stock firmware:
- Download the official firmware for your model (for example, from the site Samsung Firmware or Xiaomi Flash Tool).
- Flash it through
fastbootor a proprietary tool (Odin for Samsung, for Xiaomi). back. Mi Flash for Xiaomi). - Perform a factory reset (
Wipe datain recovery).
Important: On some devices (for example, Huawei) returning to the official firmware may block the bootloader back.
Why does the battery drain after Android 12 firmware?
Accelerated discharge after firmware is a common problem. Reasons and solutions:
- ๐ Cache and data: Reset the cache in recovery (
Wipe cache partition). - ๐ Battery calibration: Completely discharge and charge the phone 2-3 times.
- ๐ ๏ธ Background processes: Check application activity in
Settings โ BatteryDisable autorun of unnecessary apps. - โก Unoptimized kernel: If you flashed custom firmware, try a different kernel (for example, FrancoKernel for Pixel).
Is it possible to flash Android 12 without unlocking the bootloader?
No. Unlocking the bootloader is a prerequisite for any firmware via fastboot or TWRP. Exceptions:
- ๐ฑ Some devices Samsung can be flashed through Odin without unlocking, but only official firmware.
- ๐ง On older devices (up to Android 5.0), exploits sometimes work to bypass the lock, but this not relevant for Android 12.
An attempt to flash a locked device will result in an error FAILED (remote: 'Flashing is not allowed').
How to flash Android 12 on a device with a damaged screen?
If the screen does not respond to touches, but the device turns on:
- Connect the phone to the PC and use
adbto control:adb shell input tap x y # tap emulation by coordinatesadb shell input swipe x1 y1 x2 y2 # swipe emulation - To unlock the bootloader use commands
fastboot(see Step 2 in the instructions above). - If the screen is completely black, but the device is detected in
fastboot devices, flash the firmware "blindly" according to the instructions.
For devices with MediaTek (for example, Redmi 9A) firmware via SP Flash Tool with the option Format All + Download.