What you are going to do from this tutorial:
- Flash TWRP recovery on Redmi Note 7.
- Flash LineageOS 16 Pie on Redmi Note 7.
- Flash GApps on Redmi Note 7 running LineageOS 16.
LineageOS (read: Lineage OS) is a very popular custom Android ROM available for many devices. However, the official build may not immediately available for some new devices.
Luckily, its popularity encourages other third-party developers to create its unofficial builds. This also happens to Redmi Note 7.
Xiaomi Redmi Note 7 (codename Lavender) is another iteration of Redmi Note family. There are two variants of Lavender: the Global version and the Indian version.
Both versions boast similar hardware specifications. Some notable specs include Qualcomm SDM660 Snapdragon 660 (14 nm) chipset, Octa-core (4×2.2 GHz Kryo 260 & 4×1.8 GHz Kryo 260) CPUs, and Adreno 512 GPU.
There are some choices of internal storage and RAM capacities: 4GB/128GB, 4GB/64GB, and 3GB/32GB.
However, there is one discrepancy between its Global vs Indian version, the camera specifications.
While its Global (and China) version boasts 48MP camera sensor, Redmi Note 7 India only sports 12MP sensor.
Regardless its available variants, this tutorial works on all Redmi Note 7 device.
Flashing a custom ROM might be super cool but it requires caution.
We strictly recommend you to create backup of all your crucial data and files. This process will wipe your data stored in phone’s internal storage.
No body forces you to follow this guide. We hold no responsibility of any damage that may happen to your device. Neither do developers and contributors of LineageOS.
Please proceed with full caution. It always be a good practice to read the whole article thoroughly and proceed only with full understanding.
You will need:
- Windows computer either a PC or a Laptop. Windows 8/8.1/10 64-bit is recommended.
- A USB data cable. Make sure it’s a data cable and not a charging-only cable.
- Download Xiaomi ADB & Fastboot driver on your computer.
- Download Android Platform Tools r28.0.1 (zip).
- Download unofficial TWRP by TheLazyIndian (zip).
- Download latest version of Magisk root (zip).
- Download Disable Force Encryption (zip).
- Download LineageOS Unofficial Build for Redmi Note 7 (official build – zip).
- Download OpenGapps Nano for Android 9.0 Pie ARM64 (zip).
Stage 1 – How to flash TWRP on Redmi Note 7
Step 1. Disable Windows Drivers Signature Enforcement on your computer. We have the detailed tutorial here.
Step 2. Extract Xiaomi ADB Fastboot Driver zip file (miui-ADB-Driver-Installer-v1.4.3.zip) and install it on your computer. This should finish in seconds. Make sure you install it on C:\adb\. This step is necessary to install ADB Fastboot system-wide.
Step 3. Extract the miui-platform-tools_r28.0.1-win.zip on your computer. You’ll get a folder called “platform-tools“. This step is important to make sure you use the latest version of ADB-Fastboot.
Step 4. Unlock the bootloader of your phone. Read the full guide on how to unlock MIUI bootloader officially here. Please be aware that the process requires you to reset your phone. All your data will be lost.
Step 5. Extract the TWRP’s ZIP file using either Winzip or Winrar. You should now have “recovery.img” file. Copy that recovery.img into the “platform-tools” folder (Step 3).
Step 6. Now enable USB debugging on your phone. You might have it enabled during bootloader unlocking process. However, it is a good practice to double-check it.
Enabling Developer Options, go to:
Settings >> About phone >> tap the MIUI version 7x >> You are developer!
Enable USB Debugging, go to:
Settings >> Additional Settings >> Developer Options >> USB Debugging >> toggle it on.
A notification will pop up on your screen. Tap “OK“.
Step 7. Now connect your Redmi Note 7 to your computer using its USB.
Step 8. Choose “File Transfer” mode when asked (do not choose charging mode”.
Step 9. In Windows Explorer, go to the “platform-tools” folder. Hold down the Shift button on keyboard, right-click anywhere within that folder, and choose “Open command prompt window/PowerShell window from here“.
Step 10. Now type following lines of command. Hit Enter every each line to issue it.
adb reboot bootloader
The first line asks your computer to recognize your device. The second line instructs your phone to boot into bootloader mode a.k.a fastboot mode. You’ll see the Mi Bunny logo displayed.
Step 11. Next, it is required to wipe userdata. At this point you’ll lose all your data. Issue this command to proceed:
fastboot format userdata
Step 12. Now you can flash TWRP by typing this command:
fastboot flash recovery recovery.img
The flashing process should finish in few seconds.
Step 13. Now type this command but do not hit Enter key just yet.
Step 14. Hold the Power button and Volume Up button simultaneously and hit the Enter key on your keyboard. This step is crucial to boot into TWRP recovery successfully. Otherwise, TWRP will get replaced by the stock recovery again.
Voila! Your Redmi Note 7 should now reboot successfully into TWRP recovery.
Stage 2 – How to flash LineageOS 16 on Redmi Note 7
Step 1. At this point your phone should already boot into TWRP. Now do the “Swipe to allow system modifications“. This is only required for the first time entering TWRP.
Step 2. Choose “Wipe” from the main menu then choose “Format Data“. Proceed accordingly.
Step 3. Once done, go back again then choose “Wipe” then choose “Advanced wipe“.
Step 4. Select Cache, Data, System, Ssystem_root, and Vendor.
Step 5. Do the “Swipe to wipe” action and proceed accordingly.
Step 6. Finished? Now in your computer, find the zip files of LineageOS, GApps, and Magisk (e.g: lineage-16.0-20190526-UNOFFICIAL-lavender.zip, open_gapps-arm64-9.0-nano-20190209.zip, and Magisk-v19.1.zip). Copy those files to your phone through Windows Explorer.
Alternatively, you can also place those files inside the “platform-tools” folder then issue this command:
adb push lineage-16.0-20190526-UNOFFICIAL-lavender.zip /tmp/ adb push Magisk-v19.1.zip /tmp/ adb push open_gapps-arm64-9.0-nano-20190209.zip /tmp/
Step 7. Now go back to main menu, choose “Install”, then locate the LineageOS zip file.
Step 8. Tap on it to select it then do the “Swipe to confirm flash” action. Sit tight and wait for it to finish flashing.
Credits of LineageOS for Lavender: LetsMakeCakes.
Stage 3 – How to flash Open GApps on Redmi Note 7 LineageOS 16
Step 1. Do not reboot just yet once the flashing process of LineageOS is done. Go back to TWRP’s main menu.
Step 2. Choose “Install” again then locate the Open GApps zip file.
Step 3. Tap on it to select it then do the “Swipe to confirm flash” action. Sit tight and wait for it to finish flashing.
At this point you can simply Reboot to System if you don’t want root access.
[Optional] How to Root Redmi Note 7 Running LineageOS 16
Step 1. Go back to the main menu again, choose “Install“, then locate the Magisk zip file.
Step 2. Tap on it to select it then do the “Swipe to confirm flash” action. Sit tight and wait for it to finish flashing.
Step 3. Once done, choose “Reboot” then “System“.
Congratulation! You have successfully flashed LineageOS 16 Android 9.0 Pie on Redmi Note 7. Furthermore, you have also flashed Google Apps on it.
Initial booting time may take time which is usually longer than usual. Once you are in, you can setup your Google Account.
Flashing GApps failed – The workaround for this is easy. In TWRP, go to “Mount”, select “system_root”, and then try reflashing OpenGApps.
Stuck in bootloop – You may try flashing Disable DM_verity and Force Encrypt zip file (e.g: Disable_Dm-Verity_ForceEncrypt_09.02.2018.zip).
Have you tried it? How was the process? Should you have any question, please do not hesitate to drop comments below.
Found a broken link? Write a comment below!