[Redmi 9A Guides, News, & Discussion] Vivalis:
The Redmi 9A is a rather aged smartphone with very limited hardware, and I don't know if anyone is still interested in modding this phone. Anyway, as I have spent a looooooot of time in try + error to find out if there's a way to install a sleaker and more responsive Android than the MIUI bloatware, I want to let you know how I achieved to do it (and what not to do).

Overview of main steps (detailled steps with links to required software further below):​

- unlock bootloader on a Redmi 9A with MIUI 12.0 (unlocked bootloader is required to be able to install a custom recovery)

- install custom recovery TWRP (custom recovery is required to flash custom ROMs)

- flash MIUI 12.5 and LineageOS in TWRP

- some final actions to fix TWRP after the ROM flashing

Disclaimer 1: I decided for the instant bootloader unlocking approach (instant of the official way with MI Tool and wait period) for the following reasons:

1. I find it unbearable that Xiaomi doesn't let me do with my hardware what I want and imposes a stupid unlocking process with lots of waiting time on me.

2. I flashed my phone with MIUI 12.5 (from 12.0) and then did the official unlocking with the MI Tool. Result: Phone stuck in boot loop 😡

3. Flashed back MIUI 12.0, but then the MI Unlock Tool told me that it wouldn't allow me any more unlocks this month 😡😡

Disclaimer 2: I decided to install LineageOS 20 (Android 13) because it's AFAIK the only custom ROM for the Redmi 9A with data encryption.

Disclaimer 3: I'm using TWRP after finding out that OrangeFox recovery doesn't work: It throws errors when flashing Vendor R and LineageOS in step 9 of this guide.

So, in this guide, I will unlock the phone with the "Bypass 168 Hours Wait Time for Xiaomi Bootloader Unlocking" tool, and then flash MIUI 12.5 and LineageOS using TWRP. Start with your phone on MIUI 12.0 and then follow the steps in this guide - if you don't, it will probably not work. You might also want to check the third post of this thread where I list all the things that don't work (all my attempts that resulted in a bricked phone or boot loop).

A word of courage: Don't be afraid of bricking your phone. In case anything goes wrong and you don't manage to achieve to install LineageOS on your phone with this guide, but end up with a bricked device, there's always a possibility to go back to MIUI. Check the 2nd post of this thread for a guide how to unbrick your phone and reinstall MIUI.

A word of warning: Of course, flashing a new ROM will wipe your data, so make sure you have your data stored in the cloud and/or backed up before you start this process.

Another word of warning: With LineageOS, you will have a clean phone without any bloatware that will run smoother and be much more responsive. So far, I haven't discovered anything that doesn't work. However, there's...

- one little drop of bitterness: From a GUI/design point of view, the MIUI is nicer than LineageOS.

- one big annoyance: Multitasking/memory management is so bad that everytime you switch to a different app, that app is being reloaded as if started anew.

Expectation management: I've spent many hours researching, reflashing the phone and trying different tools and procedures to make this work, and I can't invest more time into this. I wrote this guide in order to make my learnings accessible to others, but don't expect me to give further support/guidance on this. If anything doesn't work as described here or you don't understand what I'm talking about, please do your own research. Of course, you can ask questions in this thread, but don't expect me to answer. Hopefully, other users will take the time to answer your questions...

Hat tip to user gurangax who wrote on April 25, 2024, how he managed to install LineageOS on an unofficially unlocked phone: https://xdaforums.com/t/rom-13-unof...ed-for-redmi-9a-9c-10a-blossom.4609367/page-3

Detailled steps:​

1. Make sure you have MIUI 12.0 (Android 10) on your device as the instant bootloader unlocker doesn't work with MIUI 12.5.

2. Download official MIUI 12.0 Fastboot ROM (for 2 reasons: a) To go back to MIUI if something goes wrong. b) You need some files from this ROM.)

3. Download and copy the following files to the phone's SD card (you need them later for the installation in TWRP):

- MIUI 12.5 Recovery ROM (ZIP file)

- Vendor R: https://sourceforge.net/projects/gardenrealmec11c12c15/files/Vendor/Vendor R/

- LineageOS 20.0: https://sourceforge.net/projects/sn-roms/files/LineageOS-20.0/blossom/

- GApps (if you need them): e.g. NikGApps https://nikgapps.com/downloads

4. Install Android drivers, ADB and Fastboot on your computer. With the '15 Second ADB Installer', there's an easy way to install everything you need: https://androidmtk.com/download-15-seconds-adb-installer

5. Download and install the "Bypass 168 Hours Wait Time for Xiaomi Bootloader Unlocking" tool on your computer:

- Use this guide https://droidwin.com/bypass-168-hou...e_for_Xiaomi_Bootloader_Unlocking_MTK_Exploit and head over to the new method using the MTK exploit acc. to Update 2.

- Download the MediaTekBootloaderUnlock.zip and install the drivers (cdc-adm.inf in folder 'Driver' and UsbDk_1.0.22_x64/86.msi).

- Install Python: https://www.python.org/downloads/ (I used 3.12.3)

6. Unlock bootloader:

- Turn off phone.

- In terminal/cmd/shell, navigate into the folder MediatekBootloaderUnlock of the unlock tool and run UnlockBootloader.bat. If you get errors regarding non-existing packages, install them with these 3 commands and re-run the UnlockBootloader.bat: pip install colorama, pip install pycryptodome, pip install pyusb

- When the program says it's waiting for the device, press vol+, vol- and power while plugging in the USB cable. The unlocking process should then start.

7. Disconnect USB cable, boot device into Fastboot mode (vol- and power) and reconnect USB cable. Check if bootloader is unlocked: fastboot getvar unlocked -> should be 'yes'

8. Get the custom recovery TWRP from this source https://mifirm.net/model/dandelion.ttt#twrp and install it on your Redmi 9A:

- Unzip the TWRP zip file on your computer and rename the img file to twrp.img (or recovery.img).

- From the MIUI 12.0 fastboot ROM, copy the vbmeta.img into the TWRP folder.

- Make sure phone is still in Fastboot mode and connected via USB.

- In your computer's terminal/cmd/shell, navigate into the TWRP folder and install TWRP on your phone:

fastboot flash recovery twrp.img

fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img

- Reboot phone into TWRP recovery:

fastboot reboot-recovery

9. In TWRP recovery mode, execute the following steps to install LineageOS:

- Wipe Dalvik, Cache, Data

- Flash MIUI 12.5 Firmware from SD card (as prepared in step 3)

- Flash Vendor R from SD card (as prepared in step 3; without Vendor R, the bootloader unlock doesn't work with MIUI 12.5 and leaves the phone bricked)

- Flash LineageOS ROM from SD card (as prepared in step 3)

- Flash GApps from SD card (as prepared in step 3)

- Format data

- Reboot to System

10. Your phone should now boot into LineageOS. Before you start the setup and configuration of your LineageOS phone, we need to solve one last problem with the recovery mode that somehow got messed up during the flashings of step 9.

11. If you try to boot into TWRP recovery mode (vol+ and power) again (e.g. to make backups), your phone will probably be stuck on the TWRP splash screen. To solve this, boot into Fastboot mode (vol- and power) and execute these 2 commands in terminal (solution found in https://xdaforums.com/t/twrp-stuck-on-splash-screen.3541037):

fastboot format cache

fastboot format userdata (your data will be lost)

In case these commands return an error, the reason might be a bug in Fastboot. When I installed ADB/Fastboot with the '15 Second ADB Installer' (step 4), I had Fastboot version 31.0.3 on my computer (check version with fastboot --version) and got errors from the fastboot format commands. In this case, download the most recent Android SDK Platform-Tools from https://developer.android.com/tools/releases/platform-tools, navigate into the unzipped folder with the adb.exe and fastboot.exe and run the commands again. This way, my fastboot version was 35.0.1 and returned no errors.

In case your phone becomes dead/bricked, don't worry: Check next post for a solution.