Want to unlock your Xiaomi phone’s bootloader without using a computer? This guide shows you how! But before you start, keep these things in mind:
-
Back Up Your Phone: Unlocking your bootloader will erase all your data, so make sure you back everything up first!
-
Waiting Period: You can’t skip the 168-hour waiting period required by Xiaomi.
-
Proceed at Your Own Risk: Unlocking your bootloader can cause problems with your phone, so be careful!
What You’ll Need:
-
A Xiaomi Account: Make sure you’ve added your Xiaomi account to your phone (Settings > Xiaomi Account).
-
Developer Options Enabled: Go to Additional Settings and enable OEM Unlocking and USB Debugging by tapping the MIUI version seven times.
-
Mi Unlock Status: Add your Xiaomi account to the Mi Unlock Status section. Make sure your SIM card is inserted, Wi-Fi is off, and mobile data is on.
-
OTG Cable: You’ll need an OTG cable to connect your phone to another device.
-
Second Device: You’ll need a second device (like a tablet or another phone) to run the unlock process.
-
Termux: Download and install Termux and Termux API on your second device.
Steps to Unlock Your Bootloader:
-
Get the DATA Code:
-
Connect your phone to your second device using the OTG cable.
-
Download the Termux Mi Unlock ZIP file from this GitHub page.
-
Install the MiUnlockAccount.apk from the ZIP file on your second device.
-
Sign in to the same Xiaomi account on both devices.
-
You’ll get a verification code on your second device.
-
-
Install Termux Packages:
-
Open Termux and run these commands:
-
pkg update
-
pkg install git
-
pkg install vim
-
-
Clone the Termux MiUnlock repository and run the setup script:
-
git clone https://github.com/RohitVerma882/termux-miunlock.git && cd termux-miunlock
-
chmod +x setup.sh && ./setup.sh
-
-
-
Generate the Unlock Device Token:
-
Boot your Xiaomi phone into Fastboot Mode (Power + Volume Down).
-
Connect your phone to your second device using the OTG cable.
-
Type mi-fastboot devices in Termux to check the connection.
-
Find your phone’s codename by typing mi-fastboot getvar product.
-
Generate the Unlock Device Token using one of these commands:
-
For Snapdragon devices: mi-fastboot getvar token
-
For MediaTek devices: mi-fastboot oem get_token
-
-
You’ll get a token that you can use to unlock your bootloader without needing a computer.
Remember: This process can be tricky, so be careful and follow the steps carefully. If you’re not comfortable with this, it’s best to ask for help from someone who is more experienced.