Android firmware via USB cable is one of the most reliable ways to update or restore the system when standard methods do not work. This process requires care, but with the right approach it can solve most software problems: from freezes and errors to completely bricking the device. Unlike over-the-air updates (OTA), firmware via USB gives the user full control over the software version, the ability to roll back or install custom assemblies.
However, not all firmware is the same: official (stock firmware) from the manufacturer, custom (custom ROM) like LineageOS or Pixel Experience, as well as modified kernels require different approaches. In this article we will look all stages from preparing the device to solving common errors, so that even a beginner can safely flash his smartphone. We will pay special attention to firmware via Fastboot and ADB Sideload modes, as they cover 90% of cases of restoring Android devices.
1. Preparing the device: what needs to be done before flashing
Before connecting your smartphone to your computer, you need to complete several critical steps. Neglecting them can lead to data loss, "brick" (inoperability) of the device or even physical damage to the hardware.
Firstly, create a backup copy all important data. Firmware almost always erases internal memory, and restoring information after it is an extremely difficult task. Use cloud services (Google Drive, Dropbox) or local copying to your PC. Please note: some custom firmware requires unlocking the bootloaderwhich automatically formats the device.
- ๐ฑ Battery charge level - at least 60%. Firmware may be interrupted when the battery is low, leaving the phone inoperable.
- ๐ Original USB cable. Cheap cables often do not support data transfer, only charging.
- ๐ฅ๏ธ Computer with Windows/Linux/macOS. On Windows you will need drivers ADB and Fastboot.
- ๐ OEM unlocking (in the developer settings). Without this, firmware via Fastboot will not be possible.
The second key point is checking the device model. Firmware from another model (even from the same line) can make the phone inoperable. You can find out the exact model in the settings (Settings โ About phone โ Model) or through the command adb shell getprop ro.product.model. For devices Samsung, Xiaomi and OnePlus it is also important to take into account the region (for example, Redmi Note 10 Pro for India and the global version have different firmware).
โ ๏ธ Attention: On devices with Exynos (for example, Samsung Galaxy S22), unlocking the bootloader resets the data including internal memory, even if the firmware does not erase user partitions. On Snapdragonversions this does not happen.
2. Selection of firmware: official vs custom
Not only the functionality of the device, but also the method of its installation depends on the type of firmware. Let's consider the main options:
| Firmware type | Advantages | Disadvantages | Installation method |
|---|---|---|---|
| Official (Stock) | Stability, support for OTA updates, warranty | Limited settings, blockware (pre-installed applications) | Fastboot, Odin (for Samsung), Mi Flash (for Xiaomi) |
| Custom (Custom ROM) | More functions, updates after the end of official support | Possible bugs, loss of some functions (for example, Widevine L1) | TWRP + ADB Sideload or Fastboot |
| Modified (Magisk, Kernel) | Root access, fine-tuning performance | Risk of security breach, problems with banking applications | Fastboot (patched boot.img) or TWRP |
For most users, the optimal choice is official firmware the latest version. It can be downloaded from the manufacturers' websites:
- ๐ Samsung: SamFW or Samsung-Firmware.org
- ๐ฑ Xiaomi: Official MIUI website (select region
GlobalorEEA) - ๐ค Google Pixel: Google Factory Images
- ๐ง OnePlus/Oppo/Realme: brand support sites (look for the section
Software Update)
If you decide to install custom firmware, pay attention to the forums XDA Developers and 4PDA. Popular projects:
- ๐ฒ LineageOS โpure Android without bloatware, long-term support.
- ๐จ Pixel Experience โinterface and functions from Google Pixel.
- โก ArrowOS โbalance between performance and customization.
โ ๏ธ Attention: Marked firmware GSI (Generic System Image) are universal, but may not support camera, NFC, or mobile connectivity on your device. Before installation, check the compatibility list at XDA.
3. Installing the necessary tools on a PC
For firmware via USB you will need minimum set of appswhich varies depending on the method. Below is a universal list for most scenarios:
- ADB and Fastboot:
- ๐ช Windows: Download Platform Tools from Google (archive
platform-tools.zip). Unpack to the root of the diskC:\for convenience. - ๐ง Linux/macOS: Install via package manager:
sudo apt install adb fastboot # Debian/Ubuntubrew install android-platform-tools # macOS
- ๐ช Windows: Download Platform Tools from Google (archive
- Drivers:
- ๐ฅ๏ธ For Windows download USB drivers or use Zadig to install
libusb. - ๐ฑ For Samsung additional drivers are needed Samsung USB Driver.
- ๐ฅ๏ธ For Windows download USB drivers or use Zadig to install
- ๐ง Odin โfor flashing devices Samsung.
- ๐ฒ Mi Flash Tool โfor Xiaomi.
- ๐ค QFil โfor Qualcommdevices (for example, OnePlus, LG).
After installing the tools, check their functionality. Connect your phone in Fastboot mode (how to do this - see the next section) and run on the command line:
fastboot devices
If the device is displayed (for example, 1234abcd fastboot), then the drivers are installed correctly. If not, reinstall them or try another USB port (preferably USB 2.0).
โ๏ธ Preparing the PC for firmware
4. Entering Fastboot and Recovery modes: step-by-step guide
Flashing via USB is impossible without switching the device to a special mode:
- ๐ง Fastboot โ for installing official firmware, unlocking the bootloader, flashing the kernel.
- ๐ ๏ธ Recovery (TWRP/Stock) โ for installing custom firmware via
ADB Sideloador ZIP files.
How to enter Fastboot:
- Turn off device.
- Hold down the combination of buttons (depending on the manufacturer):
- ๐ฑ Samsung:
Volume down + Power + Bixby(hold for 10 seconds). - ๐ค Google Pixel/OnePlus:
Volume down + Power. - ๐ Xiaomi/Redmi:
Volume down + Power(on some models you must first hold downVolume up + Power, then selectFastbootin the menu).
- ๐ฑ Samsung:
Fastboot Mode.How to enter Recovery:
- Turn off the device.
- Hold:
- ๐ฑ Samsung:
Volume up + Power + Bixby(release when the logo appears). - ๐ค Google Pixel:
Volume down + Power, then selectRecovery Modevolume buttons. - ๐ Xiaomi:
Volume up + Power(hold until Mi Recovery).
- ๐ฑ Samsung:
Apply update from ADB for firmware via ADB Sideload.If lock or a request to confirm bootloader unlocking appears on the screen, it means the device is not unlocked. For Xiaomi i Google Pixel this is done through the command:
fastboot flashing unlock
On Samsung unlocking the bootloader is officially impossible without activating the mode OEM Unlock v developer settings (before flashing!).
What to do if the device is not included in Fastboot?
If the button combination does not work, try:
1. Connect the charger for 5 minutes, then try again.
2. Use another USB cable (the contact may be damaged).
3. For Samsung with a processor Exynos a special cable may be required USB Jig (for example, to exit Download Mode).
4. If the screen is black, but the PC detects the device as Qualcomm HS-USB QDLoader 9008, then the smartphone is in mode EDL (emergency firmware).
5. Firmware via Fastboot: universal method
Method Fastboot is suitable for most devices based on Qualcomm Snapdragon, MediaTek i Google Tensor. It allows you to flash both official and custom images (if they are presented in the format .img).
Step-by-step guide:
- Unpack the downloaded firmware into a folder with
platform-tools(for example,C:\platform-tools\). - Open the command line in this folder (
Shift + RMB โ Open command window). - Connect the device in mode
Fastboot(see previous section). - Check the connection:
fastboot devicesThe serial number should be displayed devices.
- For flashing the official image (for example, Google Pixel) use the script
flash-all.bat(Windows) orflash-all.sh(Linux/macOS):flash-all.batFor manual firmware, run the commands one by one (example for Xiaomi):
fastboot flash boot boot.imgfastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash dtbo dtbo.img
fastboot reboot
For devices Samsung instead Fastboot the utility is used Odin:
- Download Odin (version 3.14.4 is recommended for new models).
- Extract the firmware (file with extension
.tar.md5). - Run Odin, connect the phone in the mode
Download Mode(analogueFastbootfor Samsung). - In Odin click
APand select the firmware file (BL,CP,CSC) will be filled in automatically. - Press
Startand wait for completion (do not disconnect USB!).
โ ๏ธ Attention: On some devices Xiaomi (for example, Redmi Note 10 Pro) firmware via Fastboot requires Mi account authorization. If an error appears Mi Account Lock, you need to link the device to the account in Mi Unlock Tool in advance.
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
This will disable the system integrity check and allow you to flash modified images.-->
6. Firmware via ADB Sideload (for custom firmware)
Method ADB Sideload is used to install firmware in the format .zip via Stock Recovery or TWRP. It is suitable for custom ROMs and updates when it is not possible to flash via Fastboot.
Instructions:
- Download the firmware in the format
.zip(for example, LineageOS). - Transfer the device to
Recovery Mode(see section 4). - In the recovery menu, select
Apply update โ Apply from ADB(for Stock Recovery) orAdvanced โ ADB Sideload(for TWRP). - Connect the device to the PC and run the command:
adb sideload file_name.zipExample:
adb sideload lineage-20.0-20231201-nightly-redfin-signed.zip - Wait for completion (progress is displayed on the device screen).
- After installation select
Reboot system now.
For TWRP you can also flash the ZIP file directly from the memory card:
- Copy the firmware to
SD-cardor internal memory. - To TWRP select
Installโ specify the path to the file. - Swipe to confirm the firmware.
If after flashing a custom ROM the device is stuck on the logo, perform cleaning cache:
- Log in Recovery.
- Select
Wipe โ Format Data(careful! This will delete all data). - Reboot.
ADB Sideload does not work in Stock Recovery of some manufacturers (for example, Huawei and Oppo). In this case, you will need to first install TWRP via Fastboot.
7. Typical errors and their solutions
Even if you follow the instructions exactly, errors may occur. Below are the most common problems and ways to fix them:
| Error | Cause | Solution |
|---|---|---|
device not found (in ADB/Fastboot) |
Missing drivers or USB port faulty | Reinstall the drivers, try the port USB 2.0, disable the antivirus |
failed to allocate size (in Fastboot) |
Insufficient memory on the device or the image is damaged | Check integrity firmware file (MD5), free up space on the phone |
Signature verification failed (in Recovery) |
The firmware is not signed for your device | Disable signature verification in TWRP (Settings โ Disable signature verification) |
Mi Flash: Flash is done, but device stuck on logo |
Incompatible firmware version or locked bootloader | Check the firmware version (for example, Global vs China), unlock the bootloader |
Odin: FAIL! (Auth) |
Samsung blocks unofficial firmware files | Use the official firmware for your model and region |
If the device after flashing does not turn on or stuck on the logo:
- Try logging in in
Recoveryand doWipe Data. - If that doesnโt help, flash full image (not only
system, but alsoboot,vendor,dtbo). - For MediaTekdevices may require firmware via SP Flash Tool in
Firmware Upgrade. - โ๏ธ System setup:
- Go through the initial setup (select a language, connect to Wi-Fi).
- Update Google Play Services and other system applications.
- If you flashed a custom ROM, install GApps (Google services package) via TWRP.
- ๐ Checking for updates:
- For official firmware, check
Settings โ System update. - For custom ROMs, updates are installed via
Settings โ System Updatesor manually via TWRP.
- For official firmware, check
- ๐ฑ Data recovery:
- If you made a backup via TWRP, restore it (
Restore). - For cloud backups (Google Drive) log in to your account and synchronize the data.
- If you made a backup via TWRP, restore it (
- ๐ Security:
- If you flashed a custom ROM, install Magisk to control root access.
- Check the status SafetyNet (for example, through the app SafetyNet Test). If
ctsProfile: false, banking applications may not work.
- ๐ Reset settings to factory settings (
Settings โ System โ Reset). - ๐ Disable animations in the developer settings (
Window animation scale โ 0.5x). - ๐ Calibrate the battery: completely discharge, then charge to 100% without interruption.
- ๐ฅ๏ธ PC performance (read/write speed is especially important disk).
- ๐ USB port version (USB 3.0 is faster, but sometimes unstable for Fastboot).
- ๐ฑ Firmware size (full images weigh 2โ4 GB).
- Integrity of the firmware file (download and compare again
MD5). - USB connection (try a different cable/port).
- Availability of free space on the device (minimum 500 MB on the system partition).
If Odin or Mi Flash gives an error N/A at any stage, this often means that the firmware file damaged. Check its checksum (MD5 or SHA256) using the utility 7-Zip or HashMyFiles.
How to restore IMEI after flashing?
If IMEI is lost after flashing (no network), try:
1. Restore the backup copy of the partition nvram or persist (if you made a backup in TWRP).
2. For MediaTek use Maui META or SN Writer Tool.
3. For Qualcomm โ QCN Rebuilder or QPST.
โ ๏ธ IMEI recovery may be illegal in some countries. Use only for your device!
8. data-i="333">Successful firmware is only half the battle. After turning on the device for the first time, you need to perform several steps to ensure stable operation:
Successful firmware is only half the battle. After turning on the device for the first time, you need to perform several steps to ensure stable operation:
If after the firmware you noticed problems with performance (lags, overheating), try:
For devices with AMOLED screens after the firmware may be observed image burn-in (for example, residual traces from old icons). To reduce the effect, enable the function Adaptive backlight or use applications like Screen Burn-In Fixer.
โ ๏ธ Attention: On some custom firmware (for example, LineageOS without GApps) Google services do not work, including Play Market. To fix this, flash the package Open GApps (choose optionpicoornanoto save space).
FAQ: Frequently asked questions about Android firmware via USB
โ Is it possible to flash a phone without unlocking the bootloader?
No, for most modern devices (except for some Samsung i Huaweiunlocking the bootloader is required. The exception is official updates via Odin or Mi Flash without changing the Android version. However, even in this case, some manufacturers (for example Xiaomi) require account linking.
โ Why does flashing firmware via Fastboot take so long?
Speed depends on:
If the process is stuck at one stage for more than 10 minutes, check:
โ How to return official firmware after custom?
To return to the official firmware:
- Download full image (not OTA update) for your model from the official website.
- Flash it through
Fastboot(for Google Pixel, OnePlus) or Odin/Mi Flash (for Samsung/Xiaomi). - If the bootloader has been unlocked, you can lock it again with the command:
fastboot flashing lockโ ๏ธ This will erase all data and may cause a crash if the firmware is unofficial.
For Samsung after flashing the official ROM through Odin may work Knox, which will lead to loss of warranty and inability to use Samsung Pay.