TechBuzzPro

How to Install LineageOS 16 on Xiaomi Mi Max

· 5 min read · Phones & Tablets

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Installing LineageOS 16 on your Xiaomi Mi Max replaces the stock MIUI software with a clean, open-source Android 9 Pie build. It can revive an aging phone, remove preinstalled apps, and extend security updates beyond what Xiaomi provides. The process requires an unlocked bootloader, a custom recovery (TWRP), and a few files on your phone. Be aware that unlocking the bootloader wipes all data, and flashing a ROM voids any remaining warranty. Proceed only if you are comfortable with the risks.

What You'll Need

  • A Xiaomi Mi Max (codename hydrogen). Confirm the model in Settings > About phone; do not use files for other variants.
  • A Windows PC with a USB cable and internet access.
  • Xiaomi's Mi Unlock tool (official) and a Mi account with permission to unlock. Unlocking may require waiting a period (often 72 hours) after binding your account.
  • ADB and Fastboot installed on the PC (from Google's platform-tools).
  • TWRP recovery image for hydrogen (official TWRP or a trusted build).
  • LineageOS 16 ROM zip for hydrogen, downloaded from the official LineageOS site or a trusted source.
  • GApps package (optional) if you want Google services. Use a Pie-compatible build (e.g., MindTheGapps or OpenGApps for Android 9).
  • A charged battery (above 60%) and a backup of all important data, since unlocking and flashing erase internal storage.

Step-by-Step

  1. Back up your data. Copy photos, contacts, and files to a PC or cloud. Unlocking the bootloader wipes everything, including internal storage.
  2. Enable Developer options and USB debugging. Go to Settings > About phone and tap MIUI version seven times. Then open Settings > Additional settings > Developer options and enable USB debugging.
  3. Unlock the bootloader. On the phone, go to Settings > Additional settings > Developer options > Mi Unlock status and bind your Mi account. On the PC, install Mi Unlock, sign in with the same account, connect the phone in fastboot mode (power off, then hold Volume Down + Power), and follow the tool's prompts. If it says to wait, wait the stated hours and try again. This step erases all data.
  4. Install ADB and Fastboot on the PC. Download platform-tools from Google, extract it, and open a command prompt in that folder. Test with adb devices while the phone is booted and fastboot devices while in fastboot mode.
  5. Download TWRP and LineageOS files. Get the TWRP image for hydrogen and the LineageOS 16 zip. Optionally download GApps. Place them in the platform-tools folder for easy access.
  6. Flash TWRP. With the phone in fastboot mode, run fastboot flash recovery twrp.img (replace twrp.img with the actual filename). Then run fastboot boot twrp.img to boot into TWRP without overwriting it yet.
  7. Format data in TWRP. In TWRP, go to Wipe > Format Data and type yes. This removes encryption and wipes internal storage. Then go to Wipe > Advanced Wipe and select Dalvik/Art Cache, System, Data, and Cache; swipe to wipe.
  8. Install LineageOS. In TWRP, tap Install, select the LineageOS zip, and swipe to confirm. The script will flash the ROM. Do not reboot yet.
  9. Install GApps (optional). If you want Google services, tap Install again, select the GApps zip, and swipe to flash. Use a Pie-compatible package; flashing the wrong version can cause boot loops.
  10. Reboot to system. Go back to the main TWRP menu and tap Reboot > System. The first boot may take several minutes. Be patient and do not interrupt.

Common Mistakes

  • Flashing a ROM or recovery for a different device (e.g., helium instead of hydrogen). Always verify the codename.
  • Skipping the Format Data step, which leaves encryption in place and causes boot loops or storage errors.
  • Using GApps for the wrong Android version (e.g., Android 10 GApps on Pie). Match the version exactly.
  • Forgetting to enable USB debugging or missing the Mi Unlock waiting period, leading to failed unlocks.
  • Interrupting the first boot or removing the battery during flashing, which can brick the device.

Tips

  • Keep a copy of the stock MIUI fastboot ROM on your PC in case you need to restore.
  • Use a USB 2.0 port and a good-quality cable to avoid connection drops during fastboot.
  • After flashing, boot into TWRP and make a full backup of the new system before setting up apps.
  • If you plan to root, flash Magisk after the first successful boot, not before.
  • Check the LineageOS wiki for hydrogen for any device-specific notes before you start.

Troubleshooting

If the phone does not boot after flashing (stuck on logo for more than 15 minutes), boot into TWRP, wipe Dalvik/Art Cache, Cache, and Data (not internal storage unless necessary), then reflash the ROM and GApps in one session. If TWRP cannot mount storage, format data again. If fastboot does not detect the phone, reinstall the USB drivers (Google USB Driver or Xiaomi's), try another cable/port, and ensure the phone is in fastboot mode. If you get a bootloop after installing GApps, reflash the ROM without GApps to confirm the ROM works, then try a different GApps package. If the bootloader unlock fails, verify your Mi account is bound and the waiting period has passed; sometimes logging out and back in helps. In case of a hard brick (no fastboot), you may need to use Mi Flash Tool with a fastboot ROM, but that requires an unlocked bootloader; if locked, professional service may be needed.

Frequently Asked Questions

Do I need to root my phone to install LineageOS?

No. LineageOS is a custom ROM, not root. Root is optional and can be added later with Magisk if desired.

Will installing LineageOS void my warranty?

Yes, unlocking the bootloader and flashing custom software typically voids any remaining warranty.

Can I install LineageOS without a PC?

No, you need a PC for fastboot and ADB to unlock the bootloader and flash recovery.

What is the difference between hydrogen and helium?

Hydrogen is the 16GB model, helium is the 32GB model. ROMs and recoveries are not interchangeable; flashing the wrong one can brick the device.

How long does the first boot take?

Usually 5–15 minutes. If it takes longer than 20 minutes, something is wrong; see troubleshooting.

Can I go back to MIUI after installing LineageOS?

Yes, you can flash a stock MIUI fastboot ROM using Mi Flash Tool, but it will wipe your data.