How to find out the token of a Xiaomi device: 5 proven ways (2026)

Xiaomi’s device token is a unique digital identifier that is required to unlock a bootloader, work with ADB, configure smart devices through Mi Home or integrate with third-party services. Without it, many operations with brand technology are simply impossible: from firmware custom ROMs to connecting smart light bulbs to alternative platforms like Home Assistant. The problem is that Xiaomi does not provide the token openly – it needs to be extracted independently.

In this article, we will discuss 5 working ways to obtain a token for any Xiaomi, Redmi and POCO devices – from official request through Mi Unlock to manual extraction through ADB and specialized utilities. We will pay special attention to the nuances for new models (for example, Xiaomi 14 or Redmi Note 13 Pro+), where the manufacturer has tightened protection, and you will learn how to verify the authenticity of the token and avoid common errors that can cause the device to lock.

What is a Xiaomi device token and why is it needed?

A token (Mi Token or Device Token) is a 20-digit alphanumeric code that is generated by Xiaomi servers for each device, and is linked to a MIUI Account and a hardware identifier (IMEI or serial number).

  • πŸ”“ Unlock the bootloader through the Mi Unlock Tool (required for custom firmware installation such as LineageOS or Pixel Experience).
  • πŸ€– Get root rights through Magisk or SuperSU.
  • 🏠 Connect smart devices to Home Assistant, IoT Link, or other platforms (e.g., to manage Xiaomi Robot Vacuum without Mi Home).
  • πŸ”§ Restore access to your device after reset if your Mi Account is linked.
  • πŸ“± Bypass the limitations of regional firmware (for example, to install a global version on a Chinese smartphone).

It is important to understand that a token is not the same as a password from a Mi Account or an unlock code. SIM-It is not stored in plain view on the device and does not appear in the settings. It must either be requested from Xiaomi through official channels or extracted software.

⚠️ Attention: Starting with MIUI 14 and new models (e.g. Xiaomi) 13T Pro or Redmi K60 Ultra, the company has tightened its policy of issuing tokens. Now, they may need confirmation through the SMS Wait up to 72 hours after linking your account to your device.

Method 1: Receiving a token through the Mi Unlock Tool (official method)

This is the most reliable way, but it only works to unlock the bootloader. If you need a token for other purposes (like Home Assistant), skip this section.

Steps:

  1. Download the official Mi Unlock Tool (the version must match your firmware).
  2. Sign in to Mi Account on your phone and utility (use the same account!).
  3. Connect your phone to your PC in Fastboot mode (turn off the device, then press Volume Down + Power).
  4. In the utility, click Unlock – the system will automatically request a token from Xiaomi servers.

If the process is successful, the token will be generated and stored in Xiaomi’s database, it will not be shown on the screen, but it will be used to unlock it, and to see the token, you will need to extract it through ADB (see Method 3).

⚠️ Note: If the utility gives an error "Couldn't unlock. Wait 72 hours", it means that the account is not tied to the device. β†’ Mi Account β†’ Security and confirm ownership through SMS.

πŸ“Š Why you need a Xiaomi token?
Unlocking the loader
Connecting to Home Assistant
Installation of custom firmware
Restoring access to the device
Other

Method 2: Removing a token through Mi Home (for smart devices)

If you need a token to manage Xiaomi smart devices (such as Mi Robot Vacuum, Mi Air Purifier or Yeelight), it can be obtained through the Mi Home app using the help of the Xiaomi Smart Token. HTTP-interception.

Instructions:

  • πŸ“± Install Mi Home on your phone and log in.
  • πŸ” Connect a smart device to the application (it should appear in the list).
  • 🌐 Install a program to intercept traffic on your PC (for example, Fiddler or Charles Proxy).
  • πŸ”— Set up a proxy on your phone (in the Wi-Fi settings, specify) IP PC port).
  • πŸ”„ Run interception and update data in Mi Home – in the logs, find a request to api.io.mi.com with the option β€œtoken".

The token will look like a string of 5c11d4556d74656e74313233456789ab. Copy it and use it for integration with other systems.

Example of a token request in Fiddler
{ "method": "miIO.info", "params": [], "requestId": 12345, "token": "5c11d4556d74656e74313233456789ab" }

This method works for most MiOT devices, but is not suitable for smartphones and tablets.

Method 3: Manual token extraction via ADB (for smartphones)

For Xiaomi smartphones and tablets, the token can be extracted directly from the system using the Android Debug Bridge (ADB), which requires USB debugging and developer rights enabled.

Step-by-step:

Enable Developer Mode (click 7 times on "Version" MIUI" customized)

Activate debugging over USB in "Settings β†’ Additional β†’ For developers"

Connect your phone to your PC and confirm your trust in your computer

Install ADB-drivers (e.g. via Mi) PC Suite)

-->

  1. Open the command line (Windows) or terminal (Linux/macOS) and enter: adb shell su cat /data/data/com.xiaomi.xmsf/token If root rights are not available, use the alternative path: adb shell dumpsys activity service com.xiaomi.xmsf/.service.XMSFService | grep "token"
  2. If the token is not displayed, try to extract it from the database: adb shell su sqlite3 /data/data/com.xiaomi.xmsf/databases/xmsf.db "SELECT token FROM devices;"

On newer versions of MIUI (13+), the path to the token may be different. If the commands don't work, try using specialized utilities like MiTokenExtractor (see Method 4).

⚠️ Attention: Starting with MIUI 14, Xiaomi encrypts tokens in the database.To decrypt them, you will need a key that can only be obtained through root or exploits (for example, DirtyPipe for old cores).

Method 4: Use of specialized utilities (MiTokenExtractor, XiaomiADBFastbootTools)

If manual commands do not work, you can use ready-made tools:

Utility.Supported devicesNeed root?Reference
MiTokenExtractorXiaomi/Redmi/POCO (MIUI 10–14)No.GitHub
XiaomiADBFastbootToolsAll Xiaomi devices (including smart gadgets)For smartphones, yes.XDA
TokenGrabber (for smart devices)Mi Home-compatible devicesNo.GitHub

How to use MiTokenExtractor:

  1. Download and unpack the utility on PC.
  2. Connect the phone with the debugging enabled via USB.
  3. Run MiTokenExtractor.exe and follow the instructions.
  4. The token will be saved to the token.txt file.

For XiaomiADBFastbootTools, the algorithm is similar, but with advanced options (for example, you can extract a token for a specific device on the network).

πŸ’‘

If the utility does not find a token, try to temporarily disable the antivirus – some programs (for example, Avast or Kaspersky) block access to Xiaomi system files.

Method 5: Requesting a token through Xiaomi service centers

If all software methods do not work, you can contact the official service center Xiaomi.

  • πŸ“± Devices with a blocked loader after a failed firmware.
  • πŸ”’ Smartphones where the password from Mi Account is forgotten.
  • 🏒 Corporate customers who need a token for mass deployment of devices.

How to make a request:

  1. Find the nearest service center on Xiaomi’s website.
  2. Provide proof of purchase (check, warranty card) and passport.
  3. Write a statement stating the reason for the token request (for example, β€œunlocking the bootloader to install global firmware”).
  4. Pay for the service (the cost varies from 500 to 2000 rubles depending on the region).

The processing time of the request is from 3 to 10 business days, and the token will be sent to an email linked to the Mi Account.

⚠️ Note: Xiaomi service centers in Russia and some other countries may refuse to issue a token if the device was purchased in China or India (due to regional restrictions), in which case only an informal extraction method will help.

How to verify the authenticity of Xiaomi token

Once you have a token, it is important to make sure it is correct to avoid errors when unlocking or connecting devices.

For smartphones:

  • πŸ”— Use the Mi Unlock Tool utility – if the token is correct, it will show the status of β€œUnlocked” or β€œDevice connected".
  • πŸ“± Put the command in. ADB: adb shell getprop ro.boot.flash.locked If the answer is 0 – the bootloader is unlocked, the token worked.

For smart devices:

  • 🏠 Connect the device to Home Assistant via Xiaomi Miio integration – if the token is correct, the device will appear in the system.
  • πŸ”Œ Use the command to check the connection: miio --ip 192.168.1.100 --token YOUR_TOKEN info (replace) IP and TOKEN statuary).

If the token does not work:

  • ❌ Make sure it is copied without spaces and unnecessary symbols.
  • ❌ Check that your device and your Mi Account are linked to the same region (e.g. both are Global or both are China).
  • ❌ Regenerate the token – some services (for example, Mi Home) update it every 2-3 months.

πŸ’‘

Xiaomi’s smart device token can burn up after being reset to factory settings, in which case it needs to be re-extracted.

Frequent Mistakes and How to Avoid Them

When working with Xiaomi tokens, users face typical problems, and here are the most common ways to solve them:

Mistake.Reason.Decision
"Invalid token" in Home AssistantThe token is outdated or miscopyed.Remove the token again via Mi Home or ADB.
"Couldn’t unlock. Wait 360 hours"The Mi Account is not tied to the device.Go to Settings β†’ Mi Account β†’ Security and confirm ownership.
"No such file or directory" at ADBThe path to the token has changed in the new version of MIUI.Use MiTokenExtractor or check out current paths on XDA Developers.
The device does not appear in Mi Home after resettingThe token is reset and the new device is not tied to the account.Remove the device from your Mi Account and add it again.

If none of the methods worked, check:

  • πŸ”„ Version MIUI β€” beta-fixed (MIUI Beta) tokens can be blocked.
  • πŸ“΅ Mi Account status – if it is blocked for suspicious activity, the token will not be issued.
  • πŸ›‘οΈ Root rights – on some devices (e.g, POCO F5) The token is stored in a protected section.

FAQ: Answers to Frequent Questions

Can I get a token without a Mi Account?
No, the token is always linked to Mi Account. Without authorization in the Xiaomi system, it is impossible to extract it. If you forget the data from the account, restore it through the official website or contact for support.
How often should I update the token for smart devices?
Tokens for smart devices (Mi Home) are updated automatically every 2-3 months. If the integration with Home Assistant or other service stopped working, retrieve the token. For smartphones, the token is static and does not require updating.
Does this work for POCO and Redmi?
Yes, all of the methods described are suitable for POCO and Redmi devices, as they are based on MIUI. Except for the POCO Launcher model (e.g. POCO X6 Pro), where the path to the token may be different.
Can I use a single token for multiple devices?
No, the token is unique to each device and is tied to its IMEI or serial number.If you need to manage multiple gadgets (such as Xiaomi Vacuum and Mi Air Purifier), each will require a separate token.
What to do if a token is stolen or compromised?
If you suspect that the token fell into the wrong hands: Immediately untie the device from the Mi Account in Mi Home or on the Xiaomi Cloud website. Reset the device to factory settings (for smart gadgets, hold the reset button for 5-10 seconds). Generate a new token through ADB or Mi Home. For smartphones, it is additionally recommended to change the password from Mi Account and enable two-factor authentication.