Install custom firmware on Xiaomi Redmi 7: from unlock to optimization

Xiaomi Redmi 7

MIUI

Custom firmware

LineageOS

Pixel Experience

Havoc-OS

Android

In this guide, we will take a look at the entire process, from unlocking the bootloader to the final setup, which tools you will need, how to avoid common errors, and what to do if something goes wrong. Importantly, Redmi 7 (codenamed onc) only fits firmware built for this model, and trying to install software from Redmi Note 7 or other devices will cause modules (camera, sensors, mobile communications) to fail.

Before you start, evaluate your strength: the procedure requires basic knowledge of working with the ADB, Fastboot and custom Recovery. If you've never encountered these tools, practice on a less important device or learn our basics guides.

1.Preparation: What to do before installation

Custom firmware installation is not just a software replacement, it's a deep interference, and without proper preparation, you risk losing data or damaging your phone. Start with backup:

πŸ”Ή Save important data: contacts, photos, messages. Use Google Account for sync or programs like Titanium Backup (requires root!

πŸ”Ή Check the phone model: go to Settings β†’ The phone. β†’ Make sure you have Xiaomi Redmi 7 (onc code). 7A (Pine or other models will not work.

πŸ”Ή Charge the battery: the charge level should be at least 70%, interruption of the process due to discharge can lead to serious failures.

⚠️ Warning: If your Redmi 7 is bought in China, check if it supports global firmware.Some Chinese versions have restrictions on unlocking the bootloader.

Also prepare the computer:

  • πŸ–₯️ Operating system: Windows 10/11 (64-bit) It's not like Linux. MacOS can have driver problems.
  • πŸ”Œ Cable USB: Original or high-quality (cheap cables often don’t transmit data in Fastboot mode).
  • πŸ› οΈ Tools: Download Platform Tools (ADB Fastboot, Xiaomi drivers, and Mi Unlock Tool.

If you are using Windows, disable the driver digital signature check (otherwise, the Mi Unlock Tool may not recognize the phone). + R, type msconfig, go to the Download tab and select Safe Mode β†’ Network).

πŸ“Š What kind of firmware do you plan to install?
LineageOS
Pixel Experience
Havoc-OS
Another.
I haven't decided yet.

2 Unlocking the bootloader: a step without which you can not do

The bootloader on Xiaomi devices is locked by default, a security measure that prevents custom software installation. Unlocking in the official way requires an account to be tied to Mi and waiting (usually 72-168 hours).

πŸ“Œ Step-by-step instruction:

  1. Turn on Developer Mode: Go to Settings β†’ About Phone and click on MIUI Version 7 times.
  2. Back to Settings β†’ Additionally. β†’ For developers and activate: πŸ”“ Unlocking OEM (It may not be available on some versions. MIUI). πŸ”Œ Debugging by USB.

Connect the phone to the PC, confirm the debugging permission.

Mi Unlock Tool

Mi

If you receive a message about the need to wait, wait until the timer ends (usually 3-7 days).

⚠️ Note: If you previously unlocked the bootloader on this device, re-unlocking may go away without waiting. However, resetting the phone to factory settings will reset the unlock status!

Once successfully unlocked, the phone will restart and all data will be erased. That's fine -- that's how Xiaomi's protection works. Now you can move on to customized recavers.

πŸ’‘ Alternative method (for power users): some firmware (for example, Fastboot versions) can be installed without unlocking via the EDL-However, it requires special equipment (Qualcomm) HS-USB QDLoader 9008 and Risky for Newcomers.

πŸ’‘

If the Mi Unlock Tool is running a "Couldn't unlock" error, try using a different version of the program (e.g. 3.5.512.24) or run it on behalf of the administrator.

3. TWRP installation: custom recavers for firmware

TWRP (Team Win Recovery Project is an alternative recovery that allows custom firmware, backups and system repair. Two versions are available for Redmi 7:

  • πŸ“± Official (from the team) TWRP) β€” Stable, but may not support the latest Android versions.
  • πŸ› οΈ Unofficial (from the community) – updated frequently but may contain bugs.

πŸ”§ How to install TWRP:

  1. Download the current version TWRP to Redmi 7 (onc) from the official twrp.me website or trusted forum (e.g, XDA Developers).
  2. Rename the file to twrp.img and place it in the folder with the platform-tools.
  3. Turn off your phone and press Power + Volume Down to log into Fastboot.
  4. Connect your phone to your PC and type in the command: fastboot flash recovery twrp.img
  5. After successful installation, restart to Recavator: fastboot boot twrp.img

If TWRP It doesn't start or it loads into a standard recavery, so it's overwritten, so to avoid that, right after you log in. TWRP Go to Wipe. β†’ Format Data, type yes and confirm. This will disable automatic recovery of standard Recovery.

⚠️ Critical error: If after installation TWRP The phone doesn't turn on (black screen or logo hanging), so you didn't download the firmware for your model, and then you can only flash it through Fastboot or EDL.

Download the correct version TWRP For Redmi 7 (onc)|

Check file integrity (MD5-hash)|

Disable driver check on Windows|

Charge your phone to at least 70%|

Make a backup of data (they will be erased)-->

4. Selection and downloading of custom firmware

The firmware choice is the key to the stability of the phone, and the following popular options are available for the Redmi 7:

FirmwareAndroid versionFeaturesReference
LineageOS10–13Clean Android, stable operation, regular updatesOfficial website
Pixel Experience11–13Google Pixel interface, optimized performanceDownload
Havoc-OS10–12Maximum customization, support for themes and gesturesOfficial website
ArrowOS11–13Lightweight, close to stock AndroidDownload

πŸ” How to choose:

  • πŸ“± If you want a stable and fast Android, choose LineageOS or ArrowOS.
  • 🎨 If you want maximum customization – Havoc-OS or CrDroid.
  • πŸ“± If you like the Google Pixel interface, Pixel Experience.

Before downloading, check:

  1. Compatible with the model (onc for Redmi 7).
  2. Assembly date (up-to-date versions are updated every 1-2 months).
  3. Reviews in forums (e.g, 4PDA or XDA).

⚠️ Warning: Some firmware (especially unofficial) may not support:

  • πŸ“· Camera (not working) HDR, night-time).
  • πŸ“‘ Mobile communication (problems with VoLTE or 4G).
  • πŸ”‹ Charging (slow or unstable).

If you are critically important to these features, look for firmware marked Official or read reviews about a particular build.

What are GApps and do they need them?
GApps (Google Apps) are a package of Google services (Play Market, Gmail, YouTube, etc.) Many custom firmware comes without them, so GApps need to be installed separately. πŸ”Ή Which package to choose: - Nano or Pico - for minimalists (only the most necessary). - Stock - full set (as on standard Android). - NikGApps - optimized builds with additional chips. πŸ”Ή Where to download: OpenGApps or NikGApps.

5. Install firmware through TWRP

Now that you have unlocked the bootloader, installed TWRP You can start the final stage, and follow the instructions carefully, because an error in this step can lead to a bootloop).

πŸ“Œ Step-by-step process:

  1. Copy firmware and GApps files (if needed) to internal memory or SD-map.
  2. Turn off your phone and press Power + Volume Up to log in to TWRP.
  3. Make a full backup of your current system (optional, but recommended): Go to Backup. Select Boot, System, Data. Swipe for confirmation.

full-dump

Wipe β†’ Advanced Wipe β†’ Tag Dalvik, Cache, System, Data β†’ Swipe to Wipe
Install β†’ Select the firmware file β†’ Swipe to Confirm Flash

straight-up

Reboot β†’ System

⏳ The first run can take 5-15 minutes - don't interrupt the process! If the screen is long on the logo, wait another 10 minutes. If after this time nothing has changed, then there has been an error (see the section "Problem Solving»).

⚠️ Note: If you install firmware based on Android 12+, Make sure the version TWRP Supports the new vendor partition format, otherwise the firmware won't stand up and the phone won't boot.

πŸ’‘ Useful advice: After successful installation, return to the TWRP And backup the new system, and it'll help you recover quickly if something goes wrong after upgrades or experiments.

πŸ’‘

Always install GApps right after you have firmware, without restarting your phone. If you do this later, you may experience problems with Google services.

6. System setup and solution of common problems

Once you have successfully installed custom firmware, you have to set up the system and check that all the features are working.

πŸ”§ Initial setup:

  • πŸ“Ά Mobile Network: Go to Settings β†’ SIM-maps and mobile networks and set up APN your operator (options can be found on the provider’s website).
  • πŸ”‹ Battery: The first 2-3 charge/discharge cycles may show unstable running times – this is normal (the system calibrates the battery).
  • πŸ“· Camera: If the standard app doesn't work, install Google Camera (GCam) with Redmi 7 support.

πŸ›‘ Typical problems and their solutions:

Problem.Possible causeDecision
Phone not turned on (black screen)Incorrect firmware or interrupted installationFastboot or EDL to Fastboot
No mobile phone (no network access)There is no modem module or incorrect settings APNInstall firmware with support RIL or manually add APN
Fast battery dischargeBackground processes or non-optimized firmwareDisable unnecessary services, install the kernel with optimizations
The camera's not working.There are no drivers or librariesInstall GCam or flash firmware with support Camera2API

πŸ”„ How to return a standard firmware:

If the custom firmware is not satisfied, you can go back to MIUI. For that:

  1. Download Fastboot firmware for Redmi 7 from Xiaomi website.
  2. Unpack the archive and launch the script flash_all.bat (Windows) or use Fastboot commands manually.
  3. Wait until the process is complete (the phone will reboot automatically).

⚠️ Important: After returning to MIUI the bootloader will be blocked again, and to install custom software you will have to repeat unlocking.

7. Optimization and fine-tuning of custom firmware

Custom firmware gives you access to a lot of hidden Android features. Here are some tips on how to make the most of your Redmi 7:

⚑ Acceleration of work:

  • πŸ”§ Turn off animations: go to Settings β†’ System system β†’ Developer settings and set: Windows animation scale β†’ Off. Transition animation scale. β†’ The animator duration scale β†’ Off.
  • πŸ—‘οΈ Clean the cache regularly: use the app SD Maid or built-in function in TWRP (Wipe β†’ Cache).
  • πŸ”‹ Optimize the background processes: in Settings β†’ Disable Auto-Run Unnecessary Programs.

🎨 Customization of the interface:

  • πŸ“± Install a launcher (like Nova Launcher or Lawnchair) for flexible desktop settings.
  • 🎨 Use Substratum or Andromeda for themes (root rights required).
  • πŸ”„ Set up gestures: In firmware like Havoc-OS, you can assign swipes for quick access to functions.

πŸ”‹ Extending battery life:

  • πŸ“‰ Install a kernel with optimizations (e.g. FrancoKernel or ElementalX).
  • βš™οΈ Use Greenify to β€œfreeze” background apps.
  • πŸŒ™ Activate a dark theme and reduce the brightness of the screen (AMOLED-There are no displays on the Redmi 7, but it still saves power).

πŸ›‘οΈ Security:

  • πŸ”’ Install Magisk to manage root rights and hide them from applications (e.g. banking).
  • πŸ›‘οΈ Use AFWall.+ for controlling network access of applications.
  • πŸ”„ Regularly update the firmware (via OTA manually).

πŸ’‘ Useful tip: If you like experimentation, try the kernel performance profiles. For example, in FrancoKernel you can choose Battery mode (saving) or Performance mode (maximum power).

8. Frequently Asked Questions (FAQ)

❓ Can I install custom firmware without unlocking the bootloader?
No, unlocking the bootloader is mandatory for installing any custom software on Xiaomi Redmi 7. The only exception is firmware through the EDL-The regime, but it requires special equipment and skills.
❓ Which firmware to choose for maximum stability?
LineageOS and ArrowOS are considered the most stable.They are based on pure Android and rarely contain critical bugs. Pixel Experience is also stable, but can slow down on weak devices due to additional features.
❓ Why the camera doesn’t work after the firmware?
This is a common problem with the lack of camera drivers in custom firmware. Solutions: Install Google Camera (GCam) with Redmi 7 support. Try flashing another firmware version (look for builds marked Camera Fixed). Set modes for the camera (e.g., install modes for the camera, ANX Camera).
❓ How to update custom firmware?
Update depends on the type of firmware: πŸ”„ Official builds (e.g. LineageOS): Updated via built-in OTA or by hand TWRP. πŸ› οΈ Unofficial builds: download new versions from the forum and install through TWRP (Don't forget Wipe. Cache/Dalvik). Important: Before updating, make a backup in TWRP!
❓ Can I get it? OTA-customization?
Yes, but only if the firmware supports OTA (For example, LineageOS or Pixel Experience. β†’ System system β†’ Update. If you have an update, download it. After you download it, the phone will suggest you reboot to the recavator for installation. ⚠️ Do not update the firmware through standard Recovery - use only TWRP!