Installing pure Android on Xiaomi Redmi Note 7: the full guide

The Xiaomi Redmi Note 7, which launched in early 2019, was a hit for its value for money. However, as time went on, the standard MIUI shell became slower, more ad-loaded and more system-intensive than the legacy hardware can offer, and itโ€™s at this point that owners are faced with the question of switching to a clean Android that will give the device a second life, increase autonomy and speed up the interface.

The process of replacing the operating system requires a certain technical training and attention from the user. You have not only to download the file, but also to unlock the bootloader, install a specialized recovery and correctly install a new image of the system. Errors at any stage can lead to the inoperability of the gadget, so it is important to clearly follow the algorithm of actions and understand the essence of the operations performed.

In this article, we will go through all the steps of the transition from MIUI to custom firmware based on AOSP (Android Open Source Project), we will look at tool preparation, the process of unlocking the bootloader, installing TWRP Recovery and the final configuration of the system, the result will be a device that works smoothly, without unnecessary preinstalled software and with the current version of Android.

Preparation of the workplace and necessary tools

Before you start modifying the software, you need to ensure a stable connection between the computer and the smartphone. You need a PC or laptop running Windows, Linux or macOS, which is working. USB-cable, preferably original or certified, with good bandwidth. Also make sure that the smartphone battery is charged at least by the maximum of one. 60-70%, Because the process of firmware is energy-consuming.

You need to install drivers for Android Debug Bridge (ADB) and Fastboot. Without these components, the computer will not be able to recognize the phone in debugging or bootloader mode. It is recommended to download the Platform Tools package from the official Android developer site, as it contains the most current versions of utilities for working with the command line.

In addition to system drivers, you will need to download the firmware file itself. For Redmi Note 7 (codename lavender), the most popular and stable options are LineageOS, Pixel Experience or ArrowOS. Files should be taken exclusively from trusted sources, such as the official 4PDA forum or the development branch on XDA Developers.

โš ๏ธ Attention: You perform all flashing actions at your own risk.The author of the article is not responsible for possible failures in the operation of the device, the appearance of a โ€œbrickโ€ or the loss of personal data.

To store firmware files and additional utilities, create a separate folder on your computer with a short path, for example, C:\redmi7_flash. This will make it easier to enter commands in the terminal and reduce the likelihood of errors due to long paths to files. Also make sure you have a backup of all important contacts and photos in advance, since the internal memory will be completely cleared.

Unlocking the Bootloader bootloader

The first and most important obstacle to installing a custom system is the blocked bootloader. Xiaomi blocks it by default for security purposes, which prevents unauthorized modification of the system partition. To remove the lock, you will need a Mi Account account associated with the device and the official Mi Unlock Tool utility.

The process starts with the developer mode activation. Go to Settings. โ†’ About the phone and seven times quickly click on the version MIUI. After the message "You became a developer" appears, go to the advanced settings and find the item "Developers" where you need to activate the option "Factory Unlockยป (OEM Unlock) and โ€œDebugging by USBยป.

๐Ÿ“Š Have you ever had a lock on Xiaomiโ€™s bootloader?
Yeah, I unlocked it myself.
I tried, but there were mistakes.
No, that's the first time I've heard.
I only use stock firmware.

Then you need to switch the phone to Fastboot mode. To do this, turn off the device completely, and then press the Volume Down and Power buttons simultaneously until the image of a rabbit repairing an android appears. Connect the smartphone to your computer and launch the Mi Unlock Tool. The program will check the status of the account and, if all is correct, prompt you to unlock the device.

Keep in mind that once you have an account, you often need to wait 7 to 168 hours (one to seven days) to get around this restriction by resetting your account, and the timer will only reset and the wait will start again.

Installation of custom TWRP Recovery

After successful unlocking, the standard recovery menu is replaced with a custom one, most commonly used by TWRP (Team Win Recovery Project), which allows you to install unsigned system images, make full partition backups and clear memory before installing a new OS.

Place the file for installation twrp.img file ADB-Transfer your smartphone to Fastboot mode (as described above) and connect to your PC. Open the command line in the tool folder and enter a command to check the connection:

fastboot devices

If you see the serial number of the device, the connection is correct. Now you need to flash the image of the Recovery. It is important to understand that the standard command fastboot flash recovery can be replaced by the command fastboot boot for the first run, if you want to avoid overwriting the recovery partition by stock when you load MIUI, but for permanent installation we use flash:

fastboot flash recovery twrp-lavender.img

After successfully completing the process, which takes a few seconds, you need to immediately go to Recovery mode. On many Xiaomi devices, after you have TWRP firmware through Fastboot, the phone will reboot itself to the new menu. If this does not happen, press Volume Up and Power to vibration, then release power, continuing to keep the volume.

โ˜‘๏ธ Checklist before firmware

Done: 0 / 5

Clearing of data and preparation of sections

Switching from MIUI to pure Android requires a complete cleanup of internal memory partitions, as file systems and partition structure may differ.Neglecting this step often leads to cyclic bootloops or unstable system operation. From the TWRP menu, select Wipe, then Advanced Wipe.

The section list should include Dalvik/ART Cache, System, Data, and Cache. Internal Storage is not a partition if you put your firmware files there and want to save them, but Data formatting is often necessary to reset encryption.

Once you select the partitions, swipe the thumb over the "Swipe to Wipe" slider. The cleaning process will take some time. If you plan to move from an encrypted partition, an additional action may be required: formatting Data through the Tools menu. Type the word yes to confirm. This will delete all files, but provide a clean environment for the new system.

SectionAction.Purpose
Dalvik / ARTWipeCleaning the application compilation cache
SystemWipeRemoving the old MIUI operating system
DataWipe / FormatDeletion of user data and decryption
CacheWipeCleaning the system cache

Installation of Google firmware and packages (GApps)

Pure Android (AOSP) usually doesnโ€™t include Google services (Play Market, YouTube, Gmail) because they are proprietary. So after installing the system itself, you should immediately install the GApps package. Choose the version that matches your Android (like Android 11 or 12) and the CPU architecture (for Redmi Note 7 itโ€™s arm64).

In the main TWRP menu, click Install. In the file manager that opens, find the previously downloaded firmware zip archive. Click on it and confirm the swipe installation. Wait for the process to be completed, which can take 2 to 5 minutes.

Once you install the firmware, without restarting the system, press Install again and select the archive from GApps. The order of action is critical: first the system, then the services. If you miss this step, you will have to repeat the cleaning and firmware again, since it will be more difficult to download GApps separately to a working system without root rights.

After successfully installing both components, you can proceed to the first download.Tap Reboot System.Putting a clean Android first run can take up to 10 minutes as the system optimizes apps and creates new caches.Don't be alarmed if the screen goes out or shows a logo - it's a normal initialization process.

Set up and optimize the new system

After the welcome screen, you will be greeted with an interface that is not much different from the reference Android on Google Pixel smartphones. The first thing you need to do is connect to Wi-Fi and log into your Google account. The system will offer to restore data from the cloud, which is convenient for returning contacts and settings of applications.

However, the switch to custom firmware has its own peculiarities: some features, such as VoLTE or camera operation, may require additional customization or patch installation, especially if you use nightly builds. In stable versions (Stable), these problems are usually solved by developers.

To extend battery life, it is recommended to disable unnecessary animations in the developer menu and limit background activity of rarely used apps.Pure Android is less aggressive in memory management than MIUI, so manual control of background processes can be useful.

If you find the camera shoots worse than on a stock MIUI, consider installing a Google Camera (GCam) with the right config. GCam ports do wonders with Xiaomi's sensors, greatly improving dynamic range and nighttime shooting.

Possible problems and ways to solve them

Even with strict adherence to the instructions, there can be unexpected situations. Often users experience the phone going into a bootloop (infinite boot). In this case, you need to go back to TWRP, run Wipe Dalvik/Cache and try to boot again. If the problem is not solved, it is possible that the firmware file was corrupted during download, check the checksum (MD5/SHA1).

Another common problem is a broken sound or microphone, which is often solved by flashing Firmware (the base radio module part) before installing the system itself, and making sure that the Firmware version meets the requirements of the firmware you choose.

โš ๏ธ Note: If the proximity sensor stopped working after firmware (the screen does not go out when talking), try calibration through the engineering menu or installing a special patch in the device. TWRP, If it is available for your model.

In the event of a complete system failure (Hard Brick), when the phone does not respond to buttons and does not vibrate, you will need to use the QFIL utility (Qualcomm Flash Image Loader) and search for a special Emergency Download image (EDL) for the Redmi Note 7. This is a more complex recovery level, usually requiring disassembly of the device to close the test points.

Frequently Asked Questions (FAQ)

Will the warranty be reset after unlocking the bootloader?
Xiaomi formally indicates that unlocking the bootloader will void the software warranty. However, in practice, if you haven't physically damaged the device, service centers often go a step further. Before contacting the service, you can reflash the official stock firmware and lock the bootloader back in, returning the device to its original state.
Will banking apps and Google Pay work?
By default, Google Pay (Wallet) and some banking applications may not work on the unlocked bootloader due to a security breach, but this is solved by installing Magisk and modules to hide root rights and pass security checks.
Can I return to MIUI after installing pure Android?
Yes, it's possible. You need to download the official global or regional MIUI firmware in Recovery or Fastboot format. If the bootloader remains unlocked, you can flash Recovery firmware through TWRP. If the bootloader is locked, you will need to use the Mi Flash Tool in Fastboot mode.
Will the Redmi Note 7 be faster after the flash?
In most cases, yes. Pure Android consumes less RAM and CPU resources in the background compared to the heavy shell MIUI. The interface becomes more responsive, and battery life is often increased by 15-20% due to the absence of unnecessary advertising and background processes.