I am trying to flash the LineageOS on my Redmi Note 5 Pro (whyred). Initially, I used Windows 10 for the Xiaomi Unlock Tool. However, the Xiaomi Unlock Tool did not detect my device. So, I used this tool https://www.xiaomitool.com/V2/ to unlock my bootloader and it unlocked instantly. Now, I am using Ubuntu 21.04 (I am more comfortable using the command line here) (with android-tools-adb and android-tools-fastboot packages installed) to try to flash TWRP first.

When I connect my device, adb devices can recognise it. Then I use adb reboot bootloader to enter into fastboot. Now, fastboot devices can recognise it too. The screen of the phone shows the fastboot icon.

But, the problem comes here. I use fastboot flash recovery twrp.img and I get this error

FAILED (Write to device failed (No such device))

Now, when I use fastboot devices again. I don't see my device. Another change I see is press any key to shutdown written on the top left corner of the screen of my phone.

USB debugging, USB debugging security, OEM debugging are all enabled. Bootloader is unlocked (as I see in the settings). The phone is updated to latest MIUI version supported officially. And I used the same laptop and method to flash TWRP in a Redmi 3S (land) some time back.

  • Something else I experienced is that after randomly trying to get this right again and again, the command fastboot flash recovery twrp.img did not terminate and got stuck.
    – gr6okn
    Jun 25 '21 at 11:56
  • Well, I didn't really understand what happened. But there's this concept of Anti-roll-back due to which I was unable to flash TWRP. I followed the 5th method here and it worked. forum.xda-developers.com/t/…
    – gr6okn
    Jun 25 '21 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.