Needs to be done in a Windows system. Only needs to be done once.
- Create a Mi account on Xiaomi’s website. Beware that one account is only allowed to unlock one unique device every 30 days.
- Add a phone number to your Mi account.
- Insert a SIM into your phone.
- Enable developer options in Settings > About Phone by repeatedly tapping MIUI Version.
- Link the device to your Mi account in Settings > Additional settings > Developer options > Mi Unlock status.