[Xiaomi Redmi Note 4 Guides, News, & Discussion] djibe89:
[GUIDE/TUTORIAL/HOWTO] Xiaomi Redmi Note 4 Snapdragon stock to Android 12.1

[GUIDE/TUTORIAL/HOWTO] Xiaomi Redmi Note 4/4X Snapdragon SOC (codename mido) stock to Android 12 / LineageOS 19.1

Complete guide to install Android 12 on your Xiaomi Redmi Note 4 (Snapdragon or 4X).

This tutorial only applies to this model, to check the correct version:

in Android, go to Settings > About phone, make sure Device model is Redmi Note 4.

It must be Snapdragon: below Device model, CPU must be Octa-core Max 2.0Ghz

### If CPU is not Octa-core Max 2.0Ghz, you have the Mediatek version (codename Nikel), see here:

https://xdaforums.com/f/xiaomi-redmi-note-4-mediatek-roms-kernels-reco.5784/

### If phone is not Redmi Note 4, quit this tutorial

CHANGELOG

v4. Minor improvements, Android 13 incoming (+ Google Camera) !

v3. Android 12.1 thanks to awesome Zeelog (and @anandsvm), migrate to MindTheGApps, upgrade TWRP

v2. BitGApps, updated TWRP + Magisk

v1. Initial release

1) WHAT YOU NEED

- djibe Redmi Note 4 pack: https://bit.ly/djibe-redminote4-pack

(contains all you need: USB drivers + Mi Unlock tool + fastboot & adb + TWRP Recovery 3.6.2_9-0 + Magisk root v23)

+ ROM LineageOS Unofficial 19.1: https://xdaforums.com/t/ota-feb-16-...ineageos-18-1-mido-vanilla-by-zeelog.4186179/

Download latest build: https://github.com/zeelog/OTA/releases

+ MindTheGApps 12.1 ARM64: http://downloads.codefi.re/jdcteam/javelinanddart/gapps

or BitGApps ARM61 12.1 v1.4+: https://github.com/BiTGApps/BiTGApps-Release/releases

2) INSTALL DRIVERS

First uninstall all Oneplus, Oculus ... Android drivers.

Go to the folder you unzipped earlier.

navigate to usb_driver_r13-windows > usb_driver.

Right click on android_winusb.inf and select Install. Confirm with OK.

Restart Windows.

### If you experience problems with phone connection later, use https://github.com/lostindark/DriverStoreExplorer (thanks @Lysolus for sharing)

3) BACKUP YOUR DATA

Make sure Google/provider account is synchronized.

Backup photos, documents, contacts before going any further (ex: use the backupyourmobile app).

Connect phone to PC, search for all .jpg, .mp3, .mp4 files on your phone and retrieve data.

4) UNLOCK BOOTLOADER

### Before going further, you need the latest official firmware.

Go to Settings > About phone.

MIUI version must be 11.0.2.0 (NCFMIXM).

Unlock Developer settings:

Tap 7 times on MIUI version item.

If not: connect to Wifi, tap on System update > Check for updates.

### System won't update ? Download latest firmware from here: https://xiaomifirmwareupdater.com/firmware/mido/

MIUI Account

Insert your SIM card.

Enter Sim PIN and turn off wifi, turn on mobile data and sync.

Go to Settings > Mi Account

Enter your phone number adapted to prefix and create an account (if not yet done).

Make sure phone Mi Account is active, in Settings, besides Mi account is written an identifier.

Go to Settings > Additional settings > Developer options and scroll to Mi Unlock Status item.

Permission required, Agree

### Make sure Wifi is off and mobile data on, then tap on Add account and device, then Got it.

### As written, don't sign out of Mi account, perform factory reset or erase system data for now.

### Keep calm and carry on.

Now open the \Mi Unlock subfolder from my pack.

Launch miflash_unlock.exe ad administrator: right click on .exe > Run as administrator

Agree to terms.

Login to your Mi account (with phone number prefixed or email)

Confirm login with SMS verification.

### Alternative: Open this webpage from your PC: https://en.miui.com/unlock/

### Click on Unlock now, then Download Mi Unlock archive. Unzip and refer to previous steps.

Back to phone, turn it off.

Then hold Volume down + Power buttons until phone vibrates and displays Fastboot screen.

Connect phone to USB.

Back to PC, Mi Unlock now says "Phone connected".

Unlock button is available, click on it and confirm with Unlock anyway.

Wait until Unlocked successfully is displayed.

Click on Reboot phone.

Unlocked is written at the bottom of screen during boot.

### Need to quit Fastboot mode ? Hold Power until phone vibrates and restarts.

5) FLASH TWRP RECOVERY

Back to Android, go to Settings > Additional settings > Developer options,

switch OEM unlocking ON and USB debugging ON.

Connect phone to PC.

Open a Windows command prompt on the /flash subfolder folder you unziped earlier:

select folder with left click, right click while holding SHIFT on keyboard > Open command windows here

In command, enter

adb devices

Commands starts adb and returns: bfacf0c80104 unauthorized

On the phone, Allow USB debugging and send command again.

Command now returns: bfacf0c80104 device

Now enter

adb reboot bootloader

Phone restarts in bootloader/fastboot mode.

Enter

fastboot devices

Command returns: bfacf0c80104 fastboot

### If not, you may try to reinstall USB drivers or try another PC.

Now enter

fastboot flash recovery twrp-3.6.2_9-0-mido.img

Command returns: Finished. Total time: 1.540s

Now enter

fastboot boot twrp-3.6.2_9-0-mido.img

and wait while TWRP recovery boots.

TWRP asks: Decrypt data, tap on Cancel.

then Swipe to Allow Modifications.

Leave phone connected to PC.

We must remove encryption to access partitions.

From TWRP Home screen, go to Wipe > Format Data. This will remove all data on phone.

Type yes and confirm with bottom right icon.

6) BACKUP SYSTEM

Now go to Home screen > Backup.

Select System, Vendor, Boot, Bootloader, Firmware and EFS partitions.

Swipe to Backup and wait during Backup.

Back to Home > Mount.

Using Windows Explorer, access Redmi Note 4 and copy the TWRP folder from Internal Storage folder to somewhere safe.

Then copy LineageOS 19.1 and gapps.zip (+ magisk if you want root) to the same phone's Internal Storage folder.

### Copy both zip files straightforward. Don't unzip archives.

7) FLASH ANDROID 12.1

Once again Swipe to Allow Modifications.

Go to Install > lineage*.zip,

then Add more zips: mind*.zip.

### Optional: to flash Magisk root, go to Reboot > Recovery. Then Install > Magisk*.zip

Go to Reboot > System

8) ROOT ACCESS AND DEVELOPER MENU (OPTIONAL)

With Magisk, you are root once phone is started. No extra manipulation needed.

Superuser permissions can be managed from Magisk Manager app (it was flashed during Magisk flash. Or get it https://github.com/topjohnwu/Magisk/releases).

You can now remove install files from Internal storage.

For developer menu:

open the Settings menu, select "About Phone".

Tap on the "Build number" entry seven times. You should be notified, that the developer settings are now active.

Now go to Settings menu > System > Developer settings.

That's it.

Enjoy,

djibe

Thanks: Zeelog, @anandsvm, Aryan Kedare, @xtrymind @flex1911, LineageOS team, TWRP team, MindTheGApps team