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

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

  1. Create a Chinese Xiaomi Account Register Chinese Xiaomi Account
  2. Get Permission from the Xiaomi Community App

    Note: Skip this step for MIUI users.
    For HyperOS devices that support bypassing via MiBypassTool, Skip this step + step 3.

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

  3. Link the Account in Developer Options
  4. Run MiUnlockTool

    Download and run MiUnlockTool:

    MiUnlockTool
Warning

I discovered the glitch, on February 28, 2025, This method might be patched by Xiaomi at any time.
Last verified: April 22 2025.