How to root Redmi 4X?
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!!!