Installing custom or official firmware via a flash drive is one of the most reliable ways to update or restore Android devicewhen standard methods do not work. This method is useful if the smartphone does not turn on, is stuck on the logo, or you want to install an alternative firmware like LineageOS, Pixel Experience or the stock version from the manufacturer. Unlike updating over the air (OTA), firmware from a flash drive gives complete control over the process, but requires accuracy: an error at any stage can turn the gadget into a โ€œbrick.โ€

In this article we will look at all steps from preparing a flash drive and selecting firmware to installation via recovery or fastboot. We will pay special attention to the nuances for different brands (Samsung, Xiaomi, OnePlus etc.), since each manufacturer has its own pitfalls. If you're a beginner, don't skip the sections on backing up and unlocking your bootloader - it's critical! Experienced users can skip straight to installation instructions.

1. Preparation: what you need to know before installing the firmware

Before you start, answer three key questions:

  • ๐Ÿ” Why do you need firmware? Recovering from a crash, updating to a new version of Android, removing bloatware or installing a custom OS? The choice of firmware file depends on this.
  • ๐Ÿ“ฑ What is the device model? Firmware for Redmi Note 10 is not suitable for Redmi Note 10 Pro - check the exact modification in Settings โ†’ About phone โ†’ Model.
  • ๐Ÿ”“ Is the bootloader unlocked? On most devices (except Google Pixel and some Samsung) it is locked by default. Unlocking erases all data!

If you are installing unofficial firmware (for example LineageOS), make sure it is compatible with your model. To do this, check the list of supported devices on the developer's website. Download official firmware only from the manufacturerโ€™s resources or trusted sources (XDA Developers, 4PDA). Firmware from an unknown source may contain malicious code or be compiled with errors, which will lead to the communication module or camera not working.

โš ๏ธ Attention: On devices Samsung with a processor Exynos (for example, Galaxy S21, Note 20) after flashing the firmware through Odin protection may work Knox, which will void the warranty and block some functions (for example, Samsung Pay).
๐Ÿ“Š What is the brand of your Android device?
Samsung
Xiaomi/Redmi/Poco
OnePlus
Google Pixel
Huawei/Honor
Other

2. Selecting firmware: official vs custom

Firmware is divided into two types: stock (from the manufacturer) and custom (from the community). Let's look at the pros and cons of each option.

Firmware type Advantages Disadvantages Where to download
Official (stock) Stable operation, support for all functions (NFC, camera, Widevine L1), security updates May contain bloatware, limited settings, slow updates Official website of the brand, Firmware.mobi, SamMobile (for Samsung)
Custom (AOSP) Clean Android, advanced settings, regular updates, no advertising Some functions may not work (for example, banking applications due to lack of certification), less stability XDA Developers, LineageOS Wiki, 4PDA
Port from another device Unique functions (for example, firmware from Pixel to Xiaomi) High risk of inoperability, errors with sensors or communication Enthusiast forums (not recommended for beginners)

For beginners, the optimal choice is official). firmware. It guarantees the functionality of all modules and minimal risk of errors. Custom firmware is suitable for those who want more control over the system or updates that cannot be expected from the manufacturer (for example, for older devices like Xiaomi Mi A1 or Samsung Galaxy S7).

When downloading the firmware, pay attention to:

  • ๐Ÿ“Œ Android version (for example, Android 13 or Android 14).
  • ๐Ÿ“Œ Region (firmware for Europe may not be suitable for Russia due to differences in LTE frequencies).
  • ๐Ÿ“Œ File type: .zip (for recovery), .tar/.md5 (for Odin), .img (for fastboot).
๐Ÿ’ก

Before downloading, check the hash sum (MD5/SHA1) of the firmware file. This will help avoid errors due to a damaged archive. Compare the hash with what is listed on the website developer, using utilities like 7-Zip or HashMyFiles.

3. Preparing a flash drive and device

For firmware you will need:

  • ๐Ÿ“ USB drive (better FAT32, up to 32 GB). NTFS or exFAT may not be supported in recovery.
  • ๐Ÿ”Œ OTG adapter (if the device does not have a slot for a flash drive).
  • ๐Ÿ”‹ Charge at least 50%. The firmware may take 10โ€“30 minutes, and battery drain will interrupt the process.
  • ๐Ÿ–ฅ๏ธ Computer (to unlock the bootloader or create a bootable USB flash drive).

Preparation steps flash drives:

  1. Format the flash drive in FAT32 (via Explorer or utility Rufus).
  2. Copy the firmware file (.zip) in root flash drives (not in a folder!). For example, the path should look like this: E:\lineage-20.0-20260510-nightly-redfin.zip.
  3. If the firmware consists of several files (for example, boot.img, system.img), make sure that they are all located on flash drive.

For devices with Mediatek (for example, Realme, Oppo), a special utility may be required SP Flash Tool, and for Samsung โ€” OdinIn these cases, a flash drive is not needed, but we will consider a universal method. via custom recovery (for example, TWRP).

โš ๏ธ Attention: On some devices (Huawei, Honor) after unlocking the bootloader, data encryption stops working and the internal memory becomes inaccessible. Backup is mandatory!

Make a backup of data (photos, contacts, SMS)|Check the device model and firmware version|Unlock the bootloader (if required)|Format the flash drive to FAT32|Copy the firmware to the root of the flash drive-->

4. Installing the firmware via recovery (TWRP/OrangeFox)

The most popular method of flashing firmware from a flash drive is via custom recovery (TWRP, OrangeFox). It is suitable for most devices, except Samsung (it is used Odin) and some models Huawei.

Step-by-step guide:

  1. Loading into recovery:
    • Turn off the device.
    • Hold the combination of buttons (depending on the model):
      • ๐Ÿ“ฑ Xiaomi/Redmi/Poco: Power + Volume up.
      • ๐Ÿ“ฑ Samsung: Power + Volume up + Bixby (if available).
      • ๐Ÿ“ฑ OnePlus/Google Pixel: Power + Volume down.
  2. Connecting a flash drive:
    • Insert the flash drive through the OTG adapter (if needed).
    • In TWRP select Mount โ†’ Enable MTP (if you need to transfer files from a PC).
  3. Firmware installation:
    • Go to Install โ†’ select the firmware file on the flash drive.
    • Swipe to confirm (Swipe to Confirm Flash).
    • Wait for completion (may take 5-15 minutes).
  4. Clearing the cache:
    • After installation, select Wipe cache/dalvik.
    • Reboot the device (Reboot System).

If after rebooting the device is stuck on the logo, try:

  • ๐Ÿ”„ Repeat the firmware with full reset (Wipe โ†’ Format Data to TWRP).
  • ๐Ÿ”ง Install a different firmware version (the selected assembly may be incompatible with your region).
What to do if TWRP does not see the flash drive?

1. Check the format of the flash drive - it should be FAT32 (not exFAT or NTFS).

2. Try another OTG adapter or USB port.

3. In TWRP go to Mount and make sure the box opposite is checked USB-OTG.

4. If the flash drive is still not detected, copy the firmware to internal memory via ADB Sideload:

adb sideload firmware.zip

5. Firmware via fastboot (for devices without recovery)

If the device does not have custom recovery, but the bootloader is unlocked, you can flash the system via fastboot. This method is more often used for Google Pixel, OnePlus and some models Xiaomi.

Required tools:

  • ๐Ÿ–ฅ๏ธ A computer with ADB i Fastboot installed (you can download it at Android SDK Platform Tools).
  • ๐Ÿ“ Firmware in format .img (for example, boot.img, system.img).
  • ๐Ÿ”Œ USB cable (preferably original).

Instructions:

  1. Connect the device to the PC and put it in mode fastboot:
    adb reboot bootloader

    Or manually: turn off the device and press Power + Volume Down.

  2. Check the connection:
    fastboot devices

    The device serial number should be displayed.

  3. Flash the files one by one (example for Pixel):
    fastboot flash boot boot.img
    

    fastboot flash system system.img

    fastboot flash vendor vendor.img

  4. Clear the cache:
    fastboot erase cache
  5. Reboot the device:
    fastboot reboot
โš ๏ธ Attention: On devices with dynamic partitions (Dynamic Partitions, for example Pixel 4 and newer) instead of separate system.img and vendor.img the file is used super.img. To flash it you will need a utility fastbootd or lpbootimg.

If the device does not boot after flashing the firmware, check:

  • ๐Ÿ” Compatibility of the firmware with your model (for example, redfin for Pixel 5, raviole for Xiaomi Mi 11).
  • ๐Ÿ” Correctness of the commands (a typo in the file name will lead to an error).
  • ๐Ÿ” Availability of all necessary files (sometimes you need to flash dtbo.img or vbmeta.img).
๐Ÿ’ก

Firmware via fastboot erases data only if you explicitly specify the command fastboot erase userdata. However, when upgrading to another version of Android (for example, from 12 to 13), it is recommended to perform a reset to avoid errors.

6. Flashing Samsung devices via Odin

For smartphones Samsung (for example, Galaxy S22, Galaxy A53) the utility Odinis used. It allows you to flash official and some custom firmware in the format .tar.md5.

Step-by-step guide:

  1. Download Odin (version 3.14.4 or later) and firmware in the format .tar.md5 (for example, from site SamMobile).
  2. Unpack the firmware: there should be files inside AP, BL, CP, CSC (or HOME_CSC if you donโ€™t want to reset).
  3. Run Odin as administrator.
  4. Switch the device to Download Mode:
    • Turn off the smartphone.
    • Hold Volume Down + Power, then press Volume up to confirm.
  5. Connect the device to the PC. Odin a message should appear Added!.
  6. Upload the firmware files to the appropriate fields:
    • AP โ†’ file c AP v name.
    • BL โ†’ file with BL.
    • CP โ†’ file with CP.
    • CSC โ†’ file with CSC (select HOME_CSCif you do not want to lose data).
  • Press Start and wait for completion (do not disconnect the cable!).
  • After successful firmware, the device will automatically reboot. The first startup may take up to 10 minutes.

    โš ๏ธ Attention: If an error appears in Odin FAIL! (Auth), this means your device has a lock FRP (Factory Reset Protection) or an incompatible bootloader version. Try flashing a newer version BL (bootloader) or disable OEM Unlock in the developer settings before flashing.

    7. Solving common errors

    Even if you follow the instructions exactly, errors may occur. Let's look at the most common ones and how to fix them.

    Error Cause Solution
    E: Failed to mount /system (in TWRP) Incompatible firmware or damaged section system. Try to format system to TWRP (Wipe โ†’ Format Data โ†’ enter "yes") and repeat the firmware.
    fastboot: error: Cannot generate image for inactive slot Device uses A/B partitions (for example, Pixel, OnePlus), and the firmware is intended for an inactive slot. Add a flag --slot=all:
    fastboot flash --slot=all system system.img
    Odin: FAIL! (Write) Connection problems or damaged firmware file. Check the cable, USB port, download the firmware again. Try a different version Odin.
    Device stuck on the logo after flashing Firmware incompatibility or lack of cache clearing. Log in recovery and run Wipe cache. If it doesnโ€™t help, flash it again with a full reset.

    If the device does not turn on at all (there is no response to the buttons, the charging indicator does not light up), the bootloader may be damaged. In this case, only firmware via testpoint (for Mediatek) or contacting a service center will help.

    For devices on the processor Qualcomm (for example, OnePlus, Xiaomi) in EDL (Emergency Download Mode) you can restore the firmware using QFil or Mi Flash Tool. However, this method requires an authorized manufacturer account and is only suitable for experienced users.

    1. Turn off the device.

    2. Press Volume up + Volume down and connect the USB cable to the PC.

    3. Hold the buttons for 10โ€“15 seconds until Device Manager appears in Qualcomm HS-USB QDLoader 9008.

    4. Use QFil or Mi Flash Tool for firmware.-->

    8. Frequently asked questions (FAQ)

    โ“ Is it possible to flash Android from a flash drive without unlocking the bootloader?

    No, on most devices (except some Samsung and LG) an unlocked bootloader is required to install the firmware. The exception is official updates via recoveryif the manufacturer supports this method (for example, Xiaomi via Mi Recovery).

    โ“ Why does the mobile network or Wi-Fi not work after the firmware?

    This is a typical problem when installing custom firmware if:

    • The firmware does not contain files. data-i="324">Europe modem (For example, non-HLOS.bin For Qualcomm).
    • Firmware region mismatch (for example, firmware for Europe on the device for India).

    Solution: flash the files separately modem or install the firmware for your region.

    โ“ How to return stock firmware after custom?

    To return to the original firmware:

    1. Download the stock firmware for your model.
    2. Flash it via fastboot or Odin (for Samsung).
    3. Perform a full reset (Wipe Data), since the custom firmware may have changed the partition structure.

    On some devices (for example, OnePlus), to return to the stock firmware you will need a tool MSM Download Toolthat restores original bootloader.

    โ“ Is it possible to flash Android from a flash drive without a computer?

    Yes, if it is already installed on the device custom recovery (TWRP, OrangeFox. In this case:

    1. Copy the firmware to the flash drive.
    2. Boot into recovery.
    3. Connect the flash drive via OTG and install the firmware via Install.

    For devices without recovery (for example, Samsung without TWRP) a computer is required.

    โ“ What to do if the firmware was interrupted due to low battery?

    If the firmware was interrupted at the stage of copying files:

    • Connect the device to charging and repeat the process.
    • If the device does not turn on, try entering recovery or fastboot and flash it again.

    If an interruption occurred while writing to a partition (for example, system), firmware may be required via EDL or Test Point.