How to Install Android 9 on Xiaomi Redmi 4X: Full Guide

Owners of the popular budget smartphone Xiaomi Redmi 4X (codename santoni) often face the fact that the official support of the device from the manufacturer has ceased on the version of Android 7.1 Nougat. However, community enthusiasts continue to support the life of the gadget, creating stable builds based on newer versions of the operating system. the transition to Android 9 Pie allows not only to refresh the interface, but also to access the current versions of applications, which gradually cease to support the old APIs.

The custom firmware installation process requires careful and careful follow-up, as any errors can cause the device to fail. You will have to go through the steps of unlocking the bootloader, installing the custom TWRP recavator and directly flashing the firmware itself. Despite the apparent complexity, the procedure is well-established for this model and takes no more than 30-40 minutes.

Before you start taking action, you need to be aware of the risks and prepare all the necessary files. The Redmi 4X model is based on the Qualcomm Snapdragon 435 processor, which ensures excellent compatibility with custom builds LineageOS 16 and Pixel Experience. In this guide, we will detail every step, from tool preparation to the first launch of the updated system to minimize the likelihood of errors.

Preparation of the device and necessary files

The first and most important step is to assemble all the components that will be required for a successful installation. You will need the smartphone itself, a computer running Windows, Linux or macOS, and a serviceable one. USB-It is advisable to use an original cable or a quality analogue that can transmit data, not only charge the battery. Bad contact can interrupt the recording of system files, which will lead to critical errors.

For the Redmi 4X, the most stable are LineageOS 16.0 or Pixel Experience builds based on Android 9. You will also need a TWRP image specially assembled for the codename santoni. Don’t try to use receptacles for other Xiaomi models such as the Redmi Note 4, as this can β€œbrick” the device due to differences in memory markup.

Remember to make a full backup of all important data. The installation process involves completely cleaning the internal memory of the smartphone. Photos, contacts and documents should be transferred to the computer or to the cloud storage in advance. Also make sure that the battery charge is at least 60-70% so that the device does not turn off at the most critical time of writing system partitions.

β˜‘οΈ Preparation for flashing

Done: 0 / 5

To work with the bootloader and transfer commands from the computer, you will need ADB and Fastboot drivers. In modern versions of the SDK Platform Tools, they come bundled. Once you download the archive with tools, unpack it to the root of the C disk or any short-path folder to avoid problems encoding the paths in the command line.

Unlocking the Bootloader bootloader

Xiaomi has implemented bootloader protection that prevents third-party recovery and firmware from being installed without official permission, so the first step is to get unlocked Bootloader status. It's a legal procedure, but it requires having a Mi Account and linking the device to it. Without unlocking, all subsequent actions will not be possible.

Go to the smartphone settings, go to About Phone and click on the MIUI version several times to activate the developer menu. Then, in the advanced settings, look for Mi Unlock Status and click the account add button. The system will warn you about the need to sync with the cloud and possible data cleanup - we agree, as this is a mandatory security requirement.

What to do if the status is not updated?
If the status in the Mi Unlock app is not updated after you have linked your account, make sure that your phone is on mobile internet (not Wi-Fi). Sometimes you need to wait 24 to 168 hours (7 days) from the moment of the link before Xiaomi's server gives permission to unlock, which is device theft protection.

Once you have your account tied, you need to download the official Mi Unlock Tool to your computer. Launch the program, log in to the same Mi Account as your phone. Put your smartphone into Fastboot mode, pressing both the power and volume buttons when the device is off. Connect your phone to your PC and press the Unlock button in the utility. If enough time has passed since the link, the bootloader will be unlocked and the device will reboot with data cleanup.

πŸ“Š What kind of loader status do you start with?
Blocked (Mi Unlock closed)
Unlocked earlier
I don't know, I need to check.
I have a global version of ROM.

Installation of custom TWRP Recovery

Xiaomi’s regular recovery is limited in functionality and does not allow you to install zip archives signed with a non-key certified. To install Android 9, we need TWRP Recovery. It is a powerful recovery environment that allows you to do full backups, clean partitions and install custom firmware. There are many versions of TWRP for Redmi 4X, but it is better to use a stable 3.x build.

The installation process is done via Fastboot mode. Make sure the image file has a.img extension (e.g. twrp-3.x.x-x-santoni.img). Place this file in the ADB tool folder. Open the command line or PowerShell in this folder and enter the command to check communication with the device: fastboot devices. If you see the serial number, then the drivers are installed correctly.

To directly record the image, the command fastboot flash recovery twrp-3.x.x-x-santoni.img. However, if you just restart the phone after this command, the Xiaomi hardware firmware will rewrite the TWRP back to stock recovery. To avoid this, immediately after recording is completed, press the button combination Volume Up + Power and hold them until the TWRP logo appears. This will allow you to boot into the installed recave.

πŸ’‘

If TWRP asks for a password and you didn't, try the standard Mi Account password or just click Cancel. Sometimes it helps to choose English and not set a password on the first run.

Memory markup and partition cleaning

Switching to a new version of Android requires a clean installation. Trying to upgrade on top of the old system ("Dirty Flash") often leads to cyclic restloops and errors in the application work. So the cleaning step (Wipe) is critical. In a TWRP environment, go to the Wipe section and select Advanced Wipe.

The following items should be noted in the list of sections: Dalvik / ART Cache, System, Data and Cache. Internal Storage section is not necessary if you downloaded firmware files to the internal memory of the phone. If the files are on the memory card or transferred through ADB Sideload, you can clean up the internal memory, but this will require re-uploading files.

After selecting the partitions, slide your finger over the slider to confirm the cleanup. The process will take a few seconds. It is also recommended to format the Data partition if you are going from an encrypted file system or other firmware. To do this, select Format Data from the Wipe menu and type in the word yes. This action will delete all files, but ensures that there are no encryption conflicts.

SectionAppointmentNeed to be cleaned?
SystemContains operating system filesYes (Required)
DataUser data and applicationsYes (Required)
CacheTemporary system filesYes.
Dalvik/ARTCash of application optimizationYes.
Internal StorageInternal storage (photos, files)No (if the firmware is on the map)

The Android 9 (Pie) installation process

Now we move on to the main stage, which is installing the operating system itself. lineage-16.0-...-santoni.zip) It should be either on a microSD card or in the phone's internal memory (unless you've formatted it completely). TWRP Select the Install option.

Navigating the file system in TWRP is done by touching. Find your way to your zip file. After selecting the firmware file, a confirmation slider will appear on the screen. Before swiping it, make sure that the right version is chosen for santoni. Also, if you plan to use Google services, immediately after selecting the firmware (with the "Add More Zips" button), add the archive with GApps (pico or nano version for Android 9 is recommended) so that you don't re-flash the phone.

Installation process:


1.Push Install.




2. Select ZIP firmware




3. (Optional) Select ZIP GApps




4. Swipe for confirmation

The file writing process will start, which is accompanied by logs at the bottom of the screen. It usually takes 2 to 5 minutes. Upon completion, the message "Successful" will appear. Don't rush to boot the system immediately. To properly work the new OS, you need to perform another cache cleaning. Go back to the Wipe menu and clear the Dalvik and Cache partitions again.

πŸ’‘

The installation order is critical: First, firmware, then GApps (if needed), and only then, cleaning Dalvik/Cache before the first run.

First start and initial setup

After successful installation, go back to the main TWRP menu and select Reboot -> System. Android 9's first run on Redmi 4X can take longer than usual - 3 to 10 minutes. This is fine, as the system compiles optimized code for your CPU. If the bootloader logo hangs longer than 15 minutes, an incompatible firmware version may have been selected or Data was not cleaned.

If you boot successfully, you'll see the Android Pie Welcome Screen. Choose a language, connect to Wi-Fi, and log in to your Google account. The system may suggest you upgrade Google Play services, OK. Pay attention to the touch screen and sensors. Custom firmware sometimes requires manual calibration or patching, but stable builds on Redmi 4X are rare.

It is recommended to check the Android version in settings (About Phone) and build number right away. Make sure the mobile network, sound and camera work. Android 9-based cast-iron firmware often offers a cleaner interface and better autonomy compared to stock MIUI, but may have slight differences in camera functionality due to the lack of Xiaomi processing algorithms.

⚠️ Warning: If after installation you see a strong heating of the device into a simple or fast battery discharge, try using Wipe. Dalvik/Cache Sometimes, cache residues from an old system can cause background processes that load the processor.

Possible problems and solutions

Despite the stability of the firmware for Redmi 4X, Users may experience typical problems when switching to Android 9. One common mistake is a broken VoLTE or a broken one. HD-This is because proprietary modem files in custom builds can be different from stock ones. The solution often lies in running the current modem through Fastboot or choosing a different build. ROM.

Another problem is β€œthe gathering" DRM-This can affect the operation of the wide-angle camera (although in the 4X It's one) or streaming services in high quality. To avoid this, never clear the persist section in the content. TWRP. If you accidentally did this, you can only restore the keys from a backup made before cleaning, or by flashing the stock image persist.

⚠️ Note: When installing firmware, make sure that partition scheme is used MBR, not GPT, Unless you've changed the structure of the disk manually. 4X β€” MBR. Using the wrong partition table will make the device unloadable.

If the phone goes into an endless bootloop, don't panic. Boot back to TWRP (clamping Volume Up + Power) and try to run a full Wipe (Format Data). If that doesn't help, maybe the firmware file was downloaded with errors - check the checksum (MD5) of the file and download it again. It's also worth trying an older or, conversely, newer nightly build.

How do I get back to the official MIUI?
To return to the stock, use the Mi Flash Tool program and the Fastboot ROM firmware file. It is important to select the Clean All mode to erase the custom Recovery and the bootloader will return to its original state (but remain unlocked).
Is it safe to unlock the bootloader on Redmi 4X?
Yes, it is a routine procedure provided by the manufacturer, but the warranty on the device may be lost (although this is no longer relevant for older models), the main risk is data loss when unlocked and the theoretical possibility of a user error during firmware, which will lead to inoperability.
Will Widevine L1 be gone and Netflix will stop working in HD?
On most custom firmware for Redmi 4X, Widevine's protection level drops to L3, limiting streaming quality on Netflix and other services to SD (480p).L1 is only possible on stock firmware or special builds with saved DRM keys, but their stability is not guaranteed.
Can I update this firmware "over the air" (OTA)?
Officially OTA-Some custom firmware (such as Pixel Experience) have an internal update mechanism, but most often, a new version of Android 9 (such as with a security patch) requires a manual re-installation. ZIP-file-through TWRP.
Why do you need a GApps file and can you do it without it?
Google Apps is a Google Play Market, YouTube, maps and framework, without which you will have an open source only system (AOSP) where you cannot install apps from the Google Store. If you need Google services, you must install the GApps file immediately after you have firmware.