I wish to install TWRP, LineageOS and Magisk on a Redmi 4X I have to replace the stock ROM.

I installed ArrowOS on a Lenovo Vibe K5 Plus very recently and it went very smoothly.

However searching around online, unlocking Redmi phones seem to be a real pain.

While this link tells how to root it and install TWRP(the easy part) it doesn't talk about the part of unlocking the phone's bootloader in the first place. This link leads nowhere.

This link is pretty irrelevant because I don't have a Windows PC. Any tips to do this with Arch Linux??

I couldn't really make sense of this rather long and intimidating thread though it seems to be the most promising one.

I couldn't make any sense of the other google results and they lead me nowhere.

I'm still quite a noob with Android and so would appreciate any help I get.

  • unlocking requires mi account and activated sim card bonded to device for 15 days. after this period unlocking works with miflash unlock tool. Francesco Tescari has reverse engineered miflash unlock and provides unofficial linux alternative MiUnlockTool.sh (requires java). There is also another linux build of unofficial XiaoMiTool V2 which provides bootloader unlocking
    – alecxs
    Commented Feb 21, 2021 at 8:49
  • @alecxs, I installed xiaomitool-v2 (aur.archlinux.org/packages/xiaomitool-v2/) available in the arch user repository. But when I open it, it is apparently still in beta. So Will it be safe to use this tool? Can it make the phone COMPLETELY bricked? Commented Feb 21, 2021 at 11:37
  • Why do I need to keep an active sim in the phone? Can't it be done without the sim? Commented Feb 21, 2021 at 12:25
  • I just don't get how a VM running windows 10 can safely root a phone. Won't I get problems with drivers and such? Commented Feb 23, 2021 at 16:56

1 Answer 1


So I successfully rooted my device and installed lineageos in it today.

I created an mi account(couple days back) witj my phone number, made a windows vm and used an [unofficial tool] [https://kkworld.in/unlock-mi-bootloader-without-waiting-time/] to unlock the bootloader.

Initially getting my vm to recognise connected usb devices was an issue but I found a [superuser solution][https://superuser.com/a/1295185] and then rebooting.

You can check if usb devices are working without turning on a vm. I've posted it [here][https://github.com/arch-linux-enthusiast/android-rooting/commit/3924a65d6681a4efd9fdfd2931b82d47321e3556]. Yep I've also made a github account (with very little substantial content since I barely know anything).

I didn't have any waiting time for the unlocking to happen, but keep in mind this tool is possibly modded as far as I know. If you have the patience, use the official tool and wait it out.

Thanks for all the support, I couldn't have done it without your help, @alecxs!!!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .