[Redmi K20 / Xiaomi Mi 9T ROMs, Kernels, Recoveries] raul16:
View attachment 6031607

LineageOS 21 is a free, community built, aftermarket firmware distribution of Android 14, which is designed to increase performance and reliability over stock Android for your device.

Disclaimer:

#include <std_disclaimer.h>

/*
* Your warranty is now void.
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/

LineageOS is based on AOSP with contributions from many people within the Android community. It can be used without any need to have any Google application installed. If needed you can install any GApps package available for U.

LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

The source code for LineageOS is available at GitHub. And if you would like to contribute to Lineage OS, please visit Gerrit Code Review. You can also view the Changelog for a full list of changes & features.

Instructions:

make a FULL backup first from your actual system and data;

before installing make sure you are running the latest firmware for your region;

clean install is required initially since the device now uses retrofitted dynamic partitions

Clean install:

Download the latest recovery file, named recovery.img.

Download super_empty.img since the device now uses retrofitted dynamic partitions

Boot into fastboot using keys: hold Volume Down + Power. Keep holding both buttons until the word “FASTBOOT” appears on the screen, then release

Flash empty super image: fastboot wipe-super super_empty.img

Flash recovery onto your device: fastboot flash recovery recovery.img

Download the latest ROM zip and GApps (optional) from the downloads section below;

Boot into recovery using keys: hold Volume Up + Power. Keep holding both buttons until the “MI” logo appears on the screen, then release

Tap Factory Reset, then Format data / factory reset to format /data. This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition

Sideload the LineageOS .zip package but do not reboot before sideload also GApps (optional), thus you get best integration of vanilla Lineage OS with GApps using:

On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.

On the host machine, sideload the package using: adb sideload filename.zip.

reboot to system and enjoy latest LineageOS 21 [Android 14] on your Redmi K20 / Xiaomi Mi 9T.

Dirty flash/upgrade:

download the latest ROM zip from the downloads section below;

go to recovery and sideload ROM zip; if GApps installed no need to update it (all data will survive)

reboot to system;

NOTES:

If you get the following error: fastboot: usage: unknown command wipe-super, make sure ADB and fastboot are updated to the latest version. You need fastboot version 28.0.2 or greater.

Add-ons aren’t signed, and therefore when they are sideloaded, Lineage Recovery will present a screen that says Signature verification failed, this is expected, please click continue.

IMPORTANT:

Other recoveries may not work for installation or updates. We recommend to use only the Lineage one linked below!

Downloads:

rom: LineageOS 21

gapps: MindTheGapps

recovery: Lineage Recovery

Reporting bugs:

Bug reports without a complete description of the issue and a logcat will be ignored!

DO NOT Report bugs if you're running a custom kernel or you installed Xposed

Grab a logcat right after the problem has occurred. (Please include at least a few pages of the log, not just the last few lines, unless you know what you're doing.)

If it is a random reboot, grab /sys/fs/pstore/console-ramoops and /sys/fs/pstore/dmesg-ramoops-0. (Do not bother getting a logcat unless you can get it just before the reboot. A logcat after a reboot is useless)

Credits:

ArianK16a for initial DT

LineageOS Team & Contributors

Code Aurora Forum

Redmi K20 / Xiaomi Mi 9T contributors

GPL compliance:

Kernel source

Donations:

donations are not mandatory but very welcomed

if you like my work and want to support development or buy me a coffee PayPal Donate

ROM OS Version: Android 14.0.0_r14

ROM Kernel: Linux 4.14.x

ROM Firmware Required: V12.5.2.0.RFJCNXM / V12.1.4.0.RFJMIXM / V12.1.4.0.RFJINXM

Based On: LineageOS 21

Version Information

Status: Beta

Created on 2023-11-08

Last Updated 2023-11-11

Screeshots:

View attachment 6031597View attachment 6031600View attachment 6031601View attachment 6031603View attachment 6031605View attachment 6031604View attachment 6031602