How to remove the pattern lock from the application on Xiaomi: from Safe Mode to ADB

A forgotten graphical key to an app on Xiaomi can be a serious problem β€” especially if it comes to banking services, instant messengers or work utilities. Unlike unlocking the smartphone screen, where Mi Account often helps, deprotecting a particular application requires other approaches. Fortunately, MIUI has several legal ways to get around this lock without losing data, from simple Safe Mode to advanced ADB commands.

It is important to understand that the methods vary in complexity and risks. For example, resetting the application settings through the phone menu is suitable for most users, but working with ADB will require skills and can lead to data loss if you do not act correctly. In this article, we will discuss all the current ways for Xiaomi on MIUI 12-14, including the Redmi Note 10/11/12 models, POCO F3/F4 and Xiaomi 13/14 flagships. If you are not sure about yourself, start with the safest options.

1. Unlocking through Safe Mode (without data loss)

Safe Mode is the easiest way to temporarily disable the app’s graphical key, and in this mode, Xiaomi loads without third-party services, often bypassing the lock.

How to activate:

  • πŸ”„ Turn off your smartphone, then hold the Power button until the logo appears. MI.
  • πŸ‘† Once the logo appears, press and hold the Volume Down button until the system is fully loaded.
  • πŸ“± In the lower left corner of the screen will appear the inscription Safe Mode – now you can open the blocked application.

In Safe Mode, the graphical key of some applications (such as WhatsApp or SberBank Online) is reset automatically, but once rebooted to normal mode, the lock can return, a method suitable for one-time access to data.

⚠️ Attention: B MIUI 14 on some models (Xiaomi 13 Pro, Redmi Note 12 Pro)+) Safe Mode may not work for hardware-encrypted applications (like Google Pay.

πŸ“Š What kind of smartphone you Xiaomi?
Redmi Note 10/11/12
POCO F3/F4/F5
Xiaomi 12/13/14
Other

2. Reset application settings via MIUI settings

If Safe Mode doesn’t work, try resetting your application settings, which works for most programs other than system ones (such as Mi Wallet or Security).

Instructions:

  1. Open Settings β†’ Applications β†’ Application Management.
  2. Find the blocked application in the list and tap it.
  3. Select Warehouse β†’ Clear data and Clear cache.
  4. If you have the option Reset settings – use it.

Once reset, the app will return to factory settings and the pattern lock will be deleted, but any unsaved data inside the program (such as chats in Telegram or drafts in Word) will be lost.

Make sure there are no important unsaved data

Backup via Mi Cloud (if supported)

Remember the login / password from the account in the application

Check for alternative methods of entry (SMS, email)-->

3.Use ADB to remove pattern lock

ADB (Android Debug Bridge) is a powerful tool for power users to control a smartphone through a computer, which can remove a file with a pattern lock directly from the device’s memory.

Before we start:

  • πŸ–₯️ Install. ADB and Fastboot Tools on PC.
  • πŸ”Œ Turn on Debugging. USB In Settings β†’ The phone. β†’ Version. MIUI (Tap 7 times, then return to the Additional Settings β†’ For developers).
  • πŸ“‘ Connect Xiaomi to a PC and confirm trust in your computer on your smartphone screen.

Commands to delete the key (enter Command Prompt or Terminal):

adb shell


su




cd /data/data/[annext package]/shared_prefs




rm [name file with key].xml




exit




exit

To find out [app package], use the command:

adb shell pm list packages | grep "appendix name"

⚠️ Attention: Misuse of the right ADB Do not delete files unless you are sure of their purpose. For encrypted applications (such as Mi Home), this method may not work.

How to find a file with a pattern lock?
Files with key settings usually have the.xml extension and contain the name "lock", "key" or "pattern". For example, for WhatsApp this can be com.whatsapp_preferences.xml. Use the ls command in the folder shared_prefs, See all the files.

4. Delete via Mi Account (for system applications)

If you block a system application (Mi Wallet, Security, Gallery), you can try resetting it through your Mi Account, which only works for devices associated with your Xiaomi account.

Steps:

  1. Go to the Mi Account website and log in.
  2. Select Devices β†’ Find your smartphone β†’ Manage your device.
  3. Click Reset App Settings (not available for all models).

This method is suitable for Xiaomi with MIUI Global and may not work on custom firmware or regional versions (e.g. MIUI China).

MethodDifficultyLoss of dataWorks for
Safe Mode⭐No.Third-party annexes
Resetting settings⭐⭐Yes (inside the annex)Any applications
ADB⭐⭐⭐Possible.Applications without hardware encryption
Mi Account⭐⭐No.System applications
Hard Reset⭐⭐⭐⭐Yes (full)All cases

5.Extreme measure: Hard Reset (full reset)

If none of these methods work, you'll have to completely reset your settings, which will delete all the data on your device, including photos, contacts, and apps you've installed, and use this as a last resort.

How to make Hard Reset on Xiaomi:

  1. Turn off your smartphone.
  2. Press Power + Volume Up until the Mi Recovery logo appears.
  3. Select Wipe Data β†’ Wipe All Data (manage volume buttons, confirmation – power button).
  4. After resetting, restart the device.

⚠️ Note: On models with a locked loader (Xiaomi) 12T, Redmi K50) After Hard Reset, you may need to log in to the Mi Account that's tied to the device!

πŸ’‘

Before reset, check if sync with Mi Cloud is enabled (Settings β†’ Xiaomi Account β†’ Mi Cloud) to help restore contacts and photos after the reboot.

6. Alternative methods (for specific applications)

Some applications have built-in access recovery mechanisms, such as:

  • πŸ’¬ WhatsApp: Send the confirmation code to the linked phone number.
  • 🏦 Sberbank Online: Use the backup code from SMS or.
  • πŸ“· Gallery: Transfer photos to PC via MTP, Then reset the application settings.

For Google applications (such as Gmail or Google Drive), you can use the Google Account Manager and reset your password/key via the web interface.

πŸ’‘

Before using alternative methods, check if the pattern lock is linked to the developer account (for example, in 1Password or KeePass), in which case recovery is possible only through their services.

Frequent Mistakes and How to Avoid Them

Many Xiaomi users make the same mistakes when trying to remove a pattern lock:

  • πŸ”Œ They don't include debugging. USB beforehand ADB β€” Without this command, no one will follow.
  • πŸ“± Try to unlock system applications through Safe Mode, although this only works for third-party software.
  • πŸ”„ Do not back up before resetting settings, losing important data.
  • πŸ” Use unofficial firmware where methods with Mi Account do not work.

If you are experiencing adb: device unauthorized, check:

  1. Is access to debugging on the smartphone screen confirmed?
  2. Are the correct Xiaomi drivers installed on PC?
  3. Is the regime on? USB-Debugging in the Developer's Settings.
Can I remove the pattern lock without losing data?
Yes, in most cases, Safe Mode or a specific application setting reset helps, but system utilities (such as Mi Wallet) may require ADB or Hard Reset, which leads to data loss.
Does the ADB work on MIUI 14?
Yes, but with reservations: newer models (Xiaomi 13 Ultra, Redmi Note 12 Pro+) may require unlocking the bootloader, and some apps (such as Google Authenticator) store keys in a secure memory area where ADB does not have access.
What if your phone requires an old Mi Account after Hard Reset?
This is a feature called Mi Cloud Lock, which is activated when you reset on devices with a linked account, and to unlock your phone, you need to enter the username and password from Mi Account that was tied before the reset, and if you don't remember the data, restore it through the official website.
Can I bypass a pattern lock through TWRP?
Theoretically, yes, if your Xiaomi has a custom TWRP recap, you can manually delete key files from the /data/data/[app package] folder. However, this requires an unlocked bootloader and risks disrupting the system.
Why does the key return after the application is reset?
This happens if the app syncs settings to the cloud (like Telegram or Viber) to avoid being blocked again, disable sync in your account settings before reset, or delete the app completely, then install it again.