Modern smartphones rarely allow the user to interfere with the operation of the operating system at a low level, however, situations requiring a complete reinstallation of the software arise regularly. Official over-the-air (OTA) updates often stop arriving for devices older than two or three years, leaving owners vulnerable to security holes. In such cases, the only option is to manually install a new version of the system or a custom build.
Using an external drive is a classic and reliable method that does not require a complex cable connection to the computer after initial preparation. This method is especially relevant if ADB drivers are not installed correctly or the USB port is unstable. All you need is the flash card itself, the firmware file and attention to detail, since an error can lead to the gadget not working.
Before taking active steps, you need to understand the risks. Any tampering with the system partition Bootloader or Recovery may void the warranty. In addition, incompatibility of the software version with a specific revision of the motherboard can turn the device into a โbrickโ. Carefully check the models and versions before starting the procedure.
Preparing tools and selecting firmware
The foundation for successful flashing is the correct choice of software. You cannot simply download any Android image found on the Internet, since the processor architecture and hardware drivers are different for all devices. First, you need to know exactly the model of your device, including the letter indexes of the region, for example, Samsung Galaxy S7 SM-G930F.
The source of the files should only be trusted resources, such as the official forum XDA Developers or specialized sites like 4PDA. Look for topics dedicated specifically to your model, and pay attention to the status of the topic: if it is marked as [DEV], then the firmware is under development and may contain critical errors. Stable versions usually have the status [RELEASE] or [STABLE].
You will also need a high-quality memory card. The speed of writing and reading directly affects the installation time of the system. It is recommended to use cards of class UHS-I or higher with a capacity of at least 8-16 GB, formatted in the file system FAT32. Using old or damaged drives may result in a signature verification error during the installation process.
โ ๏ธ Attention: Before downloading the firmware, be sure to check the checksum (MD5 or SHA256) of the file with the one specified by the author of the assembly. A mismatch of even one bit may indicate that the file is damaged during loading, which will lead to installation failure.
The list of required software for preparation is as follows:
- ๐ Firmware file in the format
.zip(sometimes required.imgfor individual partitions). - ๐ป Utilities for working with ADB and Fastboot (usually included Android SDK Platform Tools).
- ๐ Recovery file (most often TWRP or OrangeFox), adapted for your model.
- ๐งน A app for cleaning a memory card from unnecessary partitions (for example, SD Formatter).
Unlocking the bootloader and installing Recovery
The standard bootloader of most smartphones is blocked by the manufacturer, which prevents the launch of unverified code. To start the process, you need to unlock Bootloader. On devices Xiaomi this requires waiting for 168 hours after linking the account, while on OnePlus or Google Pixel the process takes several minutes. The command fastboot oem unlock or fastboot flashing unlock initiates a reset of all data on the device.
After obtaining the rights to modify the bootloader, the next step is to replace the standard recovery mode with a custom one. It is through TWRP (Team Win Recovery Project) or its analogues that the operating system is installed from an SD card. The Recovery firmware process often requires entering a command indicating the specific path to the image:
fastboot flash recovery twrp-3.x.x-x-model.img
It is important to prevent automatic reboot into the system immediately after Recovery firmware, since the stock system can replace the modified partition back to the original one. Typically, a combination of the volume and power buttons is used to force entry into recovery mode immediately after the command is completed.
After the first installation of TWRP, the system may prompt you to install root access (Magisk). Reject this offer if your goal is a clean flashing to avoid version conflicts.
There are several scenarios for bootloader behavior when trying to enter Recovery:
- ๐ Automatic login to TWRP after the reboot recovery command.
- ๐ Request for a screen unlock password (you must enter PIN code).
- โ ๏ธ Warning about modified software that requires confirmation by swiping.
If you encounter a cyclic reboot immediately after installing Recovery, the image you are using may not be compatible with the current version of Android or the type of partition (A/B partition). In such cases, you need to search for an alternative recovery build.
Formatting and preparing an SD card
The quality of storage media preparation is often underestimated, but it is the file system and partition structure that play a key role. Modern versions TWRP may not see the memory card if it is formatted in NTFS or exFAT. A mandatory requirement is formatting in FAT32even if this requires the use of third-party tools on the PC, since standard Windows tools do not always offer this option for large cards.
In addition to the file system, it is important to check the physical state of the card contacts. Oxidation or dust can cause the reading of the firmware file to be interrupted at the most critical moment. It is recommended to wipe the contacts with alcohol and insert the card into the slot until it clicks. If your device uses a hybrid slot (SIM + microSD), make sure that the tray is inserted the correct way.
โ๏ธ Checking the readiness of the SD card
The firmware file is best placed in the root directory of the memory card to avoid problems with long paths to the file. The file name should not contain Cyrillic or special characters; it is better to rename it to something simple, for example rom.zip. This minimizes the risk of errors when navigating the Recovery interface, where fonts may not be displayed correctly.
The process of installing firmware via Recovery
After entering the mode Recovery the first step is to make a full backup of the current system, if possible. Navigation in TWRP is done through the touch screen or volume buttons. Go to section Backup and select all available sections: System, Data, Boot, EFS. Section EFS contains the unique identifiers of your modem (IMEI), its loss may make it impossible to connect to the cellular network.
The next step is data clearing (Wipe). To cleanly install a new system, you need to format the Dalvik / ART Cache, Cache, System i Datapartitions. Do not clear the partition Internal Storageif the firmware file is on the built-in memory, or SD Cardif the firmware is on a flash drive. In the menu Wipe select Advanced Wipe and mark the necessary items.
โ ๏ธ Attention: When switching from one version of Android to another (for example, from Android 10 to 11) or when changing the firmware type (from stock to custom), clearing the Data section required. Ignoring this step will result in a bootloop.
Now you can proceed directly to the installation. In the main menu, select Installthen press Select Storage and specify your SD card. Find the firmware file and confirm your selection. Before starting the installation, TWRP will prompt you to check the file signature - you can skip this step (Swipe to confirm) if you are sure of the source.
The order of actions is critical: Wipe (cleaning) โ Install (installation) โ Wipe Dalvik/Cache โ Reboot. Violation of the sequence can lead to errors in the system.
The installation process can take from 5 to 20 minutes, depending on the speed of the card and the size of the firmware. In the installation log (Install Log), carefully monitor the lines: the appearance of text Done! or Successfully flashed indicates success. If you see red lines with text Error or Failed, the process is interrupted.
Typical errors and methods for eliminating them
Even if you strictly follow the instructions, unforeseen situations may arise. One of the most common problems is Error 7 during installation. This error means that the installation script is checking the device model and does not find a match. This often happens when you try to install firmware intended for another modification of the smartphone (for example, a global version to a Chinese one).
Another common problem is a โblack screenโ after a reboot. If the device vibrates but the screen does not light up, the partition Boot or Vendormay be damaged. In this case, you need to return to Recovery and try to flash these partitions separately from the corresponding images .imgif they are in the firmware archive.
The table below will help you quickly diagnose the problem by symptoms:
| Symptom | Probable reason | Solution |
|---|---|---|
| Bootloop (cyclic reboot) | Data or cache conflict | Repeated Wipe Data and Cache |
| Error"Signature Verification Failed" | The integrity of the file is broken | Recheck MD5 and download the firmware |
| Wi-Fi or Bluetooth does not work | Incompatibility of drivers | Flash the correct Vendor Image |
| Hangs on the manufacturer's logo | Bootloader error | Checking Fastboot commands or returning stock |
If the device has stopped responding to buttons and does not turn on at all, it may have gone into deep recovery mode EDL (Emergency Download Mode) for Qualcomm processors or similar for MediaTek. Exiting this mode is often only possible through specialized software on a PC (for example, QPST or SP Flash Tool) and the presence of the original firmware file in the format .mbn or .scatter.
What to do if TWRP does not see the SD card?
In some cases (especially on older devices), TWRP may not mount the SD card automatically. Try selecting "Mount" in the Advanced menu and manually checking the box next to sdcard. If this does not help, format the card again with a cluster size of 32kb.
First launch and initial setup
Successful installation of the firmware is marked by the appearance of the new system logo. The first launch (First Boot) always takes significantly longer than usual - from 5 to 15 minutes. At this time, the system optimizes applications and creates caches, so do not try to reboot the device, even if it hangs for a long time in the animation.
After loading, you will be greeted by the initial setup interface. If you installed custom firmware, it is recommended to immediately install the driver package GApps (Google Apps)if they were not built into the image. Without this component, the system will not have the Play Market and Google services, which will make the smartphone unsuitable for everyday use.
โ ๏ธ Attention: On new devices with Android 11 and higher, you may need to unlock the encrypted Data section with the password or PIN code that you used on the old system. If you did a full Wipe, you can skip this step.
After completing the setup, check the main functions: calls, Internet, camera and sensors. Make sure that the Android version in the Settings โ About phone section matches the one installed. Now your smartphone is updated and ready to work with new features.
Regularly creating backups via Recovery after setting up all applications will allow you to restore the system in a couple of minutes in the future. Save backup archives on your computer or in the cloud, since storing them on an SD card does not guarantee the safety of data if the phone is physically damaged.
Is it possible to reflash a phone if it does not turn on?
If the phone does not turn on at all (no response to buttons, black screen), but when connected to a PC it makes a USB connection sound, there is a chance. You must try to enter Fastboot or Download Mode using a combination of buttons. If the modes are available, firmware can be updated via a computer. If the phone is not detected by the PC at all, you will need to disassemble and short-circuit the test points on the board to enter the deep recovery mode.
Will the warranty expire after flashing?
In most cases, yes. Unlocking the bootloader and installing custom Recovery is a violation of the terms of warranty service. In addition, many manufacturers use a Knox counter (Samsung) or similar mechanisms that irreversibly record the fact of tampering, blocking access to protected functions (Samsung Pay, Secure Folder) even after returning the stock firmware.
Do I need to charge the phone before flashing the firmware?
It is absolutely necessary. The battery charge should be at least 60-70%. The firmware process and especially the first boot consume a lot of energy. If the phone turns off while writing system files, there is a high probability of damage to the partition table, which will require complex repairs.
What are GApps and why you need them?
GApps (Google Apps) is a package of Google services that is not included in pure Android (AOSP). Custom firmware is often distributed without them due to licensing restrictions. If you want to use Play Market, YouTube, Gmail and contact synchronization, you need to download the GApps package (for example, OpenGApps or NikGApps) corresponding to the version of your Android and flash it through Recovery immediately after installing the system.