Many users still use smartphones with a version of the operating system Android 5.0 Lollipopthat was released several years ago. Unfortunately, over time manufacturers stop supporting their devices, leaving owners with outdated software without the ability to receive over-the-air updates. This leads to problems with the compatibility of modern applications and vulnerabilities in system security.

However, enthusiasts and independent developers often create custom firmware that allows them to breathe new life into old hardware. Switching from Android 5 to Android 7 Nougat can significantly speed up the operation of the gadget and provide access to new functions. In this article, we will analyze in detail the process of replacing system software so that you can safely complete this procedure.

It should be immediately noted that this operation requires technical training and care. Wrong actions can turn your phone into a brick, so it is important to strictly follow the algorithm and understand the risks. We will look at both software and hardware nuances that you will encounter in the process.

Preparing the device and collecting the necessary data

Before starting any manipulations with the system partition, it is necessary to carry out thorough preparation. The first step is data backup, since during the flashing process all information in the internal memory will be permanently deleted. Save contacts, photos and documents to a memory card or cloud storage.

Next, you will need to accurately determine the model of your device. It is not enough to just know the brand name; you need the exact one, which is usually indicated on a sticker under the battery or in the section model code number, which is usually located on a sticker under the battery or in the Settings โ†’ About phone. An error in choosing the firmware, even by one letter, can lead to driver incompatibility.

โš ๏ธ Attention: Make sure that the battery charge is at least 70-80%. While writing system files, a sudden power outage is guaranteed to disrupt the structure of memory partitions, which will require complex hardware recovery.

You also need to activate the USB debugging mode. To do this, go to settings, find the โ€œBuild numberโ€ item and click on it seven times in a row to unlock the developer menu. After that, in the menu that appears, activate the switch USB debugging.

โ˜‘๏ธ Checklist for preparing for flashing

Done: 0 / 5

Unlocking the bootloader and installing Recovery

The standard bootloader of most smartphones is blocked by the manufacturer, which does not allow the installation of unsigned system images. The unlocking procedure (Unlock Bootloader) varies depending on the brand. For devices Xiaomi requires special permission through the official website, while for Nexus or OnePlus the process is performed directly through Fastboot.

After unlocking, the next step is to install a custom recovery, for example TWRP or CWM. The standard recovery menu does not have functionality for installing third-party ZIP archives with firmware. Bootloader mode Fastboot allows you to write a recovery image using a command via a computer.

fastboot flash recovery twrp.img

It is important to understand that unlocking the bootloader often leads to resetting the device to factory settings. This is a safety measure implemented by the manufacturers. Therefore, if you have not yet made a backup copy, now is the time to do it before entering commands in the terminal.

Why does unlocking reset data?

The data section is encrypted with a key tied to the bootloader state. When the status changes from Locked to Unlocked, the old key becomes invalid, and the system forcibly clears the partition to prevent data leakage from the previous owner.

Searching for and selecting compatible firmware

Finding a suitable system image is the most critical step. You need to find firmware based on Android 7.0 or 7.1, adapted specifically for your processor and screen model. The most authoritative source is the forum XDA Developerswhere the community publishes stable builds.

Pay attention to the build status. Versions with status Stable have been fully tested and are suitable for daily use. Versions Nightly or Beta may contain critical errors, reboots or broken communication modules, so installing them is not recommended for ordinary users.

In addition to the operating system itself, it is often necessary to download an add-on package Google Apps (GApps). In pure firmware (AOSP) there are no Google services, and without installing them you will not be able to use the Play Market store, YouTube and contact synchronization.

Firmware type Description Stability
Stock ROM Official firmware from the manufacturer High
Custom ROM Modified version (LineageOS, Resurrection) Medium/High
Port ROM Port from another device (for example, from Samsung to Huawei) Low/Medium
Developer Build Test build from the developer Low
๐Ÿ“Š What type of firmware do you prefer?
Official Stock ROM
Stable Custom ROM (LineageOS)
Port from another device (Port)
Experimental assembly

The process of installing a new version of Android

After the firmware and GApps files have been copied to the internal memory or SD card, you can begin installation. Reboot your device into recovery mode, usually using the key combination Volume up + Power. In the TWRP menu, the first thing you need to do is clear partitions.

Select item Wipe and swipe to clear partitions Dalvik / ART Cache, System, Data and Caches. The partition Internal Storage does not need to be cleared if the firmware files are located there. Improper cleaning can lead to errors when mounting the file system.

โš ๏ธ Attention: Never format the partition Internal Storage in EXT4 format if you plan to store the firmware files on the phone itself. Use the FAT32 format for compatibility with PC and recovery.

Next go to the menu Install, select the archive with the firmware and confirm the installation by swiping. After completing the first stage, without rebooting the system, install the archive with GApps the same method. Violation of this sequence can lead to a cyclic reboot (bootloop).

๐Ÿ’ก

If after installing the firmware the phone is stuck on the logo, try in Recovery mode, select Wipe โ†’ Format Data (enter yes), and then reboot. This will remove data encryption.

Initial system setup and optimization

After successful installation and first boot, you will see the welcome screen for the new system Android 7. The initial setup process is similar to the standard one: connect to Wi-Fi, sign in to your Google account, and configure security settings. However, the new version may work slower immediately after installation due to background optimization of applications.

The system will run art optimization in the background, which can cause heating of the case and increased battery consumption in the first hours of use. Let the phone sit on charge for about 30-60 minutes after setup to complete all background processes.

It is recommended to immediately check the operation of the main modules: camera, Bluetooth, GPS and touch screen. Custom firmware sometimes has problems with drivers of specific equipment, which can only appear during active use.

๐Ÿ’ก

The first 24 hours after flashing are critical for identifying errors. Do not install dozens of applications at once to understand whether the system itself is stable.

Possible problems and ways to solve them

Various problems may arise during operation. One of the common problems is the lack of network or non-working IMEI. This often happens when a partition is damaged EFS or Modem. If you did not backup these partitions before flashing, recovery may not be possible without service equipment.

Another common error is โ€œsoft brickโ€, when the phone turns on, but constantly reboots or hangs on the screensaver. In this case, returning to Recovery mode and repeating a clean installation of the firmware with formatting the partition helps. Data.

  • ๐Ÿ“ฑ Bootloop: An endless reboot can be solved by resetting the settings via Recovery (Wipe Data/Factory Reset).
  • ๐Ÿ“ถ No network: Requires flashing the modem or restoring the EFS partition from a backup.
  • ๐Ÿ”‹ Fast discharge: Often treated by fully calibrating the battery or installing another system kernel.
  • ๐ŸŽฅ The camera does not work: You need to install a compatible camera application (GCam) or change the firmware version.

In some cases, you may need to flash the firmware via a computer using utilities like SP Flash Tool for MediaTek or Odin for Samsung. This is a more complex method that requires drivers and precise knowledge of the device architecture.

โš ๏ธ Attention: Interfaces of firmware tools and driver requirements may change with the release of new software versions. Always check the latest instructions on the utility developer's website before connecting the device.

What is the EFS partition?

EFS (Encrypted File System) contains the unique identification data of the device, including IMEI, MAC addresses and encryption keys. Losing this partition makes it impossible to connect to a cellular network.

Frequently asked questions (FAQ)

Is it possible to upgrade from Android 5 to 7 without losing data?

It is technically possible to perform a โ€œdirty flashโ€ (installation over the old system), but this is highly not recommended. Conflicts between old system files and libraries with the new version of Android 7 are almost guaranteed to lead to errors and unstable operation. Always do a full clean (Clean Install).

Will flashing increase the speed of an old phone?

Yes, often custom firmware based on Android 7 works faster than stock versions of Android 5, since they are optimized and do not contain unnecessary pre-installed software (bloatware). However, the performance gain also depends on the condition of the battery and the physical wear of the memory.

Is it safe to use banking applications on custom firmware?

Many banking applications use a service SafetyNetthat checks the integrity of the system. On an unlocked bootloader with custom recovery, the check may fail. To solve this problem, you need to hide root access and use Magisk Hide modules, but no one gives a 100% guarantee of security.

What to do if the phone does not enter Fastboot mode?

Try another key combination (often Volume Down + Power). Make sure ADB and Fastboot drivers are installed correctly on your computer. Also check that the USB cable and port are working properly, try connecting the device to another computer.

Is it possible to return to the official Android 5 firmware?

Yes, it is possible. You will need to find the official stock firmware image for your model and flash it through Recovery mode or the manufacturer's specialized flash tool. After this, you need to lock the bootloader again, if required for warranty service.