Below you’ll find the tutorial on how to roll back to Android 5.1 after installing Android 7.0 on your Xiaomi Mi4S device. Please pay attention, that author of this tutorial is not responsible for any of your actions, and you’re doing everything at your own risk. After downgrading to Android 5.1, all data from your device will be deleted. It’s important that you’re completely understand what you’re doing. Make sure you’ve made all required backups via TWRP Custom Recovery. In case you’ve previously unlocked bootloader on both Android 7 and Android 5, it will remain unlocked. If you’ve done unofficial bootloader unlock without getting MIUI permission, see the tutorial below. Now let’s continue.

How to downgrade Mi4S from Android 7.0 to Android 5.1

What’s required?

  • If you’ve got unofficially unlocked bootloader, you’ll need to use your PC.
  • If you’ve got officially unlocked bootloader, you need downloaded TWRP for Android 5.1, the PC will not be required.
  • In both cases, you’ll need Android 5.1 ROM.
  • Important! This method is not working on 8.2.1.0 MIUI ROM version. Roll back to earlier version!

In TWRP Custom Recovery, without rebooting your device.

  • Wipe > Swipe to confirm.
  • Install > Flash Android 5.1. > Swipe to confirm.

If you’ve got officially unlocked bootloader:

  • Install > Install .img > TWRP for Android 5.1 > Recovery > Swipe to confirm.
  • Reboot > Recovery.
  • Reboot into system.

If you’ve got unofficially unlocked bootloader:

  • Reboot into bootloader.
  • Unofficially unlock bootloader and install TWRP Custom Recovery again.
  • Reboot into system.

After that, you can return to the TWRP Custom Recovery and restore Android 5.1 backup.

How to unofficially unlock bootloader on Xioami Mi4S

  1. Download and install MiFlash tool.
  2. Enter EDL mode by typing these commands:
    adb reboot edl
  3. Download unlock patch and install via MiFlash tool (select “Flash all except data and storage”)unlock.zip
  4. Now after we’ve unlocked bootloader, we can install TWRP Custom Recovery.
  5. Download and unpack this archive: twrp (1).zip
  6. Boot your device in fastboot mode (press and hold “Volume down” and “Power” button), connect your device to PC and run flash.bat
  7. Wait until TWRP recovery start, confirm with everything and select English language.