How to unlock Xiaomi Bootloader Without PC or Mi Unlock Tool?

Xiaomi handsets have always been known for being active in the custom development scene. From flashing custom ROMs to gaining administrative privileges by rooting your device, there are a lot of possibilities.

However, before you can do any of that, there is one prerequisite that you must fulfill. You will need to unlock Xiaomi bootloader. Xiaomi is a brand that has the most cumbersome method of getting the job done.

Luckily, there is a workaround through which you can unlock Xiaomi bootloader without even needing a PC. In this guide, you will get to know how to unlock Xiaomi Bootloader without PC or Mi Unlock Tool.

How to unlock Xiaomi Bootloader without PC or Mi Unlock Tool?

Unlock Xiaomi Bootloader

Step 1: Carry out the prerequisites

  • Go to Settings -> Xiaomi account and then add your Xiaomi account
  • Now, tap on MIUI version seven times to enable Developer Options before enabling OEM unlocking and USB debugging
  • Go to Mi Unlock Status and then tap on “Add Account and Device”

Step 2: Get the Data Code

  • Now, you will require another smartphone and a USB OTG,
  • Name the smartphone whose bootloader is being unlocked as “A” while the other device is “B”
  • On your B smartphone, you should head over to GitHub, and tap on the overflow icon present at the top-right, and check “View Desktop Site”
  • Click on the Code button before selecting “Download ZIP”
  • Once it is downloaded, extract it
  • You will have a couple of files, out of which you’ll need to install MiUnlockAccount.apk
  • Launch the app and you will be taken to the Xiaomi sign-in page
  • Log in using the same account that is used on your Xiaomi handset
  • It will ask you to send a verification code on your Xiaomi handsets, so hit “Send”
  • Moreover, verify the Captcha and hit “Submit”
  • Once you have verified the Captcha, it will ask you to enter the verification code
  • You’ll be receiving an alphanumeric string of characters and you must click on “Copy”

Step 3: Install packages

  • Download and install Termux and Termux API apps from GitHub
  • Launch Termux and then type the following command –
pkg update
  • It could ask you to continue many times throughout this process, type “Y” before hitting Enter
  • Once it is done, execute the following command –
pkg install git
  • After that, type the following command and hit Enter –
pkg install vim
  • Now, you should type in the following command and hit Enter –
git clone && cd termux-miunlock
  • Execute the below command –
chmod + x && ./

Step 4: Generate the unlock device token

  • First, you should power off your Xiaomi handset
  • Press and hold the Power + Volume Down keys for booting it to Fastboot Mode
  • Plug in the OTG on your B smartphone and connect it to your Xiaomi device (A) using a USB cable
  • Type the following command in the Termux window for verifying the Fastboot Connection –
mi-fastboot devices
  • You will get a prompt – Allow Termux API to access Android
  • You need to tap on “OK”
  • Next, you should find your Xiaomi device’s codename by using the following command –
mi-fastoot getvar product
  • You will need to generate a token
  • If you’ve got a Snapdragon chipset handset, use the following command –
mi-fastboot getvar token
  • Meanwhile, if you’ve got a MediaTek chipset, use the following command –
mi-fastboot oem get_token
  • Type the below command –
chmod +x
  • Type the below command but make sure to replace “Product” with your device’s codename and replace “Token” with the one you got above while also replacing “Data” with the code you got in Step 2 –
/ --product=Product --token=Token Data
  • If this is the first time you’re trying to unlock Xiaomi Bootloader, you will get a prompt telling you to wait for 168 hours
  • Once the time limit is bypassed, you will get an Unlock Device Token from Xiaomi

Step 5: Unlock Xiaomi Bootloader without PC

  • Execute the following command (remember to replace Unlock_Token with the one that you got from Xiaomi) –
mi-fastboot oem-unlock “Unlock_Token”
  • Your smartphone will undergo a reset and the bootloader will be unlocked
  • Congrats, you are successful in your quest to unlock Xiaomi bootloader
Aviral Sharma
Aviral Sharma
Aviral Sharma is a talented and passionate writer who has been using words to express his thoughts ever since he learnt how to hold a pen. He is passionate about outer space, history, sports and most importantly technology. Aviral is a regular writer for and has been getting better by the day.

Leave a Comment