A forgotten graphical key to a Xiaomi app can be a real headache, especially when it comes to banking services, messengers or work accounts. Unlike unlocking the phone screen, where MIUI offers standard options (like binding to a Mi Account), deprotecting individual programs often requires custom solutions. In this article, we will examine 5 proven methods that work on Redmi, POCO and Xiaomi smartphones running MIUI 12/13/14 β from safe mode to ADB commands.
It's important to understand that not all methods are universal. For example, resetting through Safe Mode is suitable for stock applications (like Gallery or Notes), but it will not help with WhatsApp or SberBank Online. And methods with ADB will require on-board debugging over USB β if it is not activated in advance, you will have to look for workarounds. We have assigned instructions by difficulty level: from simple (for beginners) to technical (for experienced users).
1. Safe Mode: Temporary disabling of the pattern lock
Safe Mode disables all third-party applications, including their security settings, and is suitable for unlocking Xiaomi stock programs β for example, if you have forgotten the key to Notes, Calendar or Files.
How to activate:
- π Turn off the smartphone, then press the power button before the logo appears MI.
- π Once the logo appears, release the power button and hold the volume down button until Safe Mode loads (there will be an inscription at the bottom of the screen).
- π± Go to the app that forgot the key β the protection must disappear.
- π Install a new pattern lock or turn off protection in the app settings.
- π Restart your phone in normal mode.
β οΈ Warning: Safe Mode doesn't have third-party apps (like WhatsApp or Telegram) and if the key is on it, it won't work. MIUI 14 can block changing security settings even in Safe Mode β in this case, move on to the next method.
2. Reset application settings through the system menu
If Safe Mode doesnβt work, try resetting the settings of a particular application through the system menu, which will delete the stored pattern lock, but will not affect other data (for example, correspondence in messengers or files in the cloud), the method works for most programs, except for those that store the keys on servers (for example, banking applications).
Step-by-step:
- Open Settings β Applications β Application Management.
- Find the desired application (for example, Gallery or Notes) in the list and tap it.
- Select Warehouse and Cache β Clear the Data.
- Confirm the action. The app goes back to factory settings, and the pattern lock resets.
For some system applications (such as Settings or Phone), the Clear Data option may be blocked.
- π§ Use it. ADB (section 4 of this article).
- π Try rolling back the app update (if available on Google Play).
βοΈ Preparation for the resetting of the annex
3. Delete gesture.key file via file manager (root not required)
Some Xiaomi apps (like Notes or Calendar) store a graphical key in a local gesture.key file that can be manually removed through the file manager β no root and ADB. The method works on MIUI 12-14, but may not work on recent updates due to changes in encryption.
Instructions:
- Install a file manager with access to system folders, such as MiXplorer or FX File Explorer.
- Cross the path: /data/data/[name-packet]/shared_prefs/ For example, for Notes, the path will be: /data/data/com.miui.notes/shared_prefs/
- Find the gesture.key file (or similar, for example, lock_pattern.key) and remove it.
- Reboot your phone. The next time you run the app, the protection will be reset.
How to find out the name of the application package:
- π± Use the App Inspector app (available on Google Play).
- π Or Google for βpacket name [app name].β For example, for Xiaomi Gallery, itβs com.miui.gallery.
β οΈ Note: Deleting incorrect files can cause the application to crash. If you are not sure about the name of the package, use the method with the help of the application. ADB (Section 4: It's safer.
| Annex | Packet name | The path to the key file |
|---|---|---|
| Notes | com.miui.notes | /shared_prefs/gesture.key |
| gallery | com.miui.gallery | /shared_prefs/lock_pattern.xml |
| Calendar | com.android.calendar | /shared_prefs/calendar_lock.key |
| File Manager (File Manager) | com.mi.android.globalFileexplorer | /shared_prefs/secure_prefs.xml |
4. Unlock through ADB (for power users)
If the previous methods did not work, and debugging USB (USB Debugging was enabled before blocking, you can use Android Debug Bridge (ADB). This method allows you to reset the pattern lock for any application, including third-party messengers and banking services. USB unreactivated, ADB It will not help β you will have to use the reset to the factory settings (section 5).
Step-by-step:
- Download and install ADB Tools on your computer (e.g., Googleβs official Platform Tools).
- Connect your phone to your PC through USB-cable (use the original Xiaomi cable for a stable connection).
- Open the command prompt (cmd in Windows or Terminal in macOS/Linux) and type: adb devices If the device appears in the list, go further. If not, check the drivers or enable USB Debugging in Settings β About Phone β MIUI version (tap 7 times according to version, then return to Additional Settings β For Developers).
- Enter the command to reset the key (replace). [package_name] to the application package: adb shell pm clear [package_name] For example, for WhatsApp: adb shell pm clear com.whatsapp
- Reboot the phone. The app will be reset to factory settings.
If the pm clear command fails (e.g. due to MIUI limitations), try an alternative method:
adb shell
su
cd /data/data/[package_name]/shared_prefs/
rm gesture.key
exit
exitβ οΈ Note: Commands with su require root rights. If they don't exist, use only pm clear. ADB Some applications (e.g. SberBank Online) may require re-authorization.
π‘
If ADB doesnβt see the device, try switching the USB connection mode in Xiaomiβs notification curtain to File Transfer (MTP) and then again to Debug over USB (if available).
5. Reset to factory settings (extreme case)
If none of these methods work, you'll have to reset your phone completely, which will delete all the data, including your graphic keys, your accounts, and your files. Xiaomi has two ways to reset:
- π Using the Recovery menu: Turn off the phone. Press the power button. + Volume up button until Recovery menu appears. select Wipe Data β Wipe All Data (control - volume buttons, confirmation - power button) After reset, the phone will reboot to its original state.
- π± Through settings MIUI: Go to Settings. β The phone. β Setting reset. Select Erase all data and confirm.
After discharge:
- π The pattern lock will be removed from all applications.
- π² Reset your phone (including linking to your Mi Account).
- βοΈ Data from cloud services (such as Google Drive or Mi Cloud) can be restored after authorization.
β οΈ Note: Some Xiaomi models (e.g. Redmi Note 10 Pro) POCO X3 Pro) after reset, you may need to enter data from the associated Mi Account. If you do not remember the password, use the recovery service.
What if the phone asks for an old pattern lock after reset?
6.Alternative methods: bypassing protection through Mi Account and third-party utilities
If the standard methods did not help, you can try workarounds, but they are not suitable for all cases:
- π Restore with Mi Account: Some Xiaomi apps (like Notes or Gallery) are tied to your Mi Account. Try: Remove the app and install it again from Google Play. When you first start, log in to the same Mi Account you used before. In some cases, the protection will automatically reset.
Third-party utilities (for root only):
Software like App Lock Remove or Xposed Framework can delete a graphical key, but require superuser rights.
- π¨ Possibility of damaging system files.
- π Violation of security policy MIUI (This can lead to blocking of certain functions).
Appeal in support:
For banking applications like Sberbank Online or Tinkoff, the only safe way to do this is to call in the bank's support with proof of identity, and they can reset protection remotely.
π‘
Before using third-party utilities, check their reputation on forums (like 4PDA or XDA Developers).Many "unlockers" contain malicious code or do not work on the latest versions of MIUI.