Xiaomi Bootloader Unlock Restriction:

Code 20045 = "The place where the account is registered does not match the place where the phone is sold."

Description

On October 20, 2024, Xiaomi introduced a new restriction for bootloader unlocking.
Users who own a Chinese device with a global Xiaomi account or vice versa (a global device with a Chinese Xiaomi account) will encounter the following restriction when attempting to unlock the bootloader:

Code 20045 = "The place where the account is registered does not match the place where the phone is sold."

For users outside China who own Chinese devices, this is a major obstacle. Creating a Chinese Xiaomi account outside of China is nearly impossible, as the official website requires a Chinese phone number for registration.

Is there a solution?

On December 4, I successfully created a Chinese Xiaomi account using an email via the following link:
https://cn.account.xiaomi.com/fe/service/register/email?_uRegion=CN

However, this method alone is not sufficient. During the final step of unlocking the bootloader, the following error appears:

Code 20041 = "sorry, your mi id is not associated with a phone number"

This happens because a phone number is required in the final step. Unfortunately, the account does not allow adding a non-Chinese phone number.

After spending days searching for another method, I discovered a glitch on February 28, 2025, which allows creating a Chinese Xiaomi account using an international phone number successfully.


Solution: Step-by-Step Bootloader Unlock for Chinese Devices (For Users Outside China)

  1. Create a Chinese Xiaomi Account:

    Clear cookies from your browser.

    Open the following link in a browser to register an account with the China region:
    https://cn.account.xiaomi.com/pass/register?sid=unlockApi&_locale=en_CN

    Important Notes:
  2. Get Permission from the Xiaomi Community App:

    Note: (Skip this step for MIUI users)

    For HyperOS devices that support bypassing via https://github.com/offici5l/MiBypassTool, skip steps (2 + 3).

    Log in to the Mi Community app and request unlocking permission.

  3. Link the Account in Developer Options
  4. Run the Unlock Tool:
    https://github.com/offici5l/MiUnlockTool

Warning:

This method might be patched by Xiaomi at any time.
Last verified: February 28, 2025.

GitHub & Telegram: