Forgot the graphical key from the app on Xiaomi Redmi and canβt access the data? This problem is familiar to many users, especially after a long break in using the phone or changing the password. Unlike unlocking the screen, where the Mi Account often helps, removing the pattern lock from individual applications (for example, Gallery, Notes or Files) requires other approaches.
In this article, weβll look at 5 proven ways, from simple (via MIUI settings) to radical (reset to factory settings). Importantly, some methods can lead to data loss, so try the safe options first. If youβre using a Redmi Note 10/11/12 or newer models on MIUI 14, look at the ADB and Safe Mode sections, which are often lossless.
Before you start, make sure you have a backup of important data. For example, photos from a locked Gallery can be copied through Explorer (path: /storage/emulated/0/DCIM/) or by connecting the phone to a PC. If the application syncs to the cloud (like Notes or Contacts), it will be easier to recover the data.
1. Withdraw the pattern lock through the Mi Account (without loss of data)
The safest way is to use a Xiaomi account, which works if:
- πΉ You have previously logged in to your Mi Account on this phone.
- πΉ You have access to an email or phone number linked to your account.
- πΉ The application supports authorization via Mi Cloud (e.g. Notes, Calendar).
Instructions:
- Open the blocked application and enter the wrong pattern lock 5 times in a row, and the message will appear: "Forgot the password?".
- Click on this link and select Restore via Mi Account.
- Enter your username and password from your Xiaomi account. If two-factor authentication is enabled, confirm the login via SMS or email.
- Follow the system's tips for resetting the pattern lock.
β οΈ Note: This method does not work for third-party applications (such as WhatsApp, Viber or bank clients) and is only for standard services. MIUI, synchronized with Mi Cloud.
π‘
If you donβt remember the password from Mi Account, restore it to the official account.xiaomi.com. Use the linked email or phone number.
2. Remove the key through Safe Mode (Safe Mode)
Safe Mode allows you to temporarily disable all third-party applications and some system restrictions, this method is suitable if the pattern lock was installed not by the system, but by the application itself (for example, AppLock or Smart Lock).
How to Sign In to Safe Mode on Xiaomi Redmi:
- Turn off the phone.
- Press the Power button and hold it until the Redmi logo appears.
- Once the logo disappears, immediately press and hold the Volume Down (-) button until the phone boots.
- In the lower left corner of the screen will appear the inscription "Safe mode".
Next:
- π§ Open the blocked application β the pattern lock may not be requested.
- π§ If the key is still active, go to Settings. β Annexes β Manage applications, find the desired application and click "Clear Data" (this will delete all settings, including the key!).
- π§ Restart your phone in normal mode.
β οΈ Note: In Safe Mode, some features (such as mobile internet or Wi-Fi) may not work smoothly. Do not remove system applications, this will cause crashes!
3. Reset the pattern lock via ADB (for advanced users)
If previous methods didnβt work, you can use Android Debug Bridge (ADB), a tool for debugging Android devices, which requires connecting the phone to your computer and enabling USB Debugging.
πΉ Conditions:
- π₯οΈ The PC has installed Xiaomi drivers and ADB Tools.
- π± The phone's on debugging. USB (Settings β The phone. β Version. MIUI β Press 7 times, then return to Settings β Additionally. β For developers).
- π Cable USB Supports data transfer (not just charging!).
Instructions:
1. Connect the phone to the PC and confirm the trusted device on the smartphone screen.
2. Open the command prompt (Windows) or terminal (macOS/Linux) in the folder with ADB.
3. Enter a command to check the connection:
adb devices
(Your phone number should be displayed).
4. execute the command to remove the pattern lock:
adb shell rm /data/system/gesture.key
5.Reset the phone:
adb rebootAfter the reboot, the pattern lock will be reset, but some applications (such as Gallery) may require re-authorization through Mi Account.
βοΈ Preparation for ADB-discharge
4. Delete application data through MIUI settings
If the pattern lock is installed by the application itself (such as AppLock, Smart AppLock or Vault), it can be reset via the application management menu, which does not affect user data (photos, files), but resets all application settings.
Step-by-step:
- Go to Settings β Applications β Application Management.
- Find an application in the list that has forgotten the pattern lock (for example, Gallery or Notes).
- Click on it and select "Storage and Cache".
- Slip "Clear Data" and confirm the action.
β οΈ Note: For system applications (such as Settings or Phone), the Clear Data button may be blocked. ADB or Safe Mode.
| Annex | Can I reset the key through settings? | Data loss? |
|---|---|---|
| gallery | Yes. | No (photos remain) |
| Notes | Yes. | Yeah (story deleted) |
| Files. | Yes. | No (files will be saved) |
| AppLock | Yes. | Yeah (all locks will drop) |
| Settings | No. | β |
5. Reset to factory settings (last resort)
If nothing works, then you have Hard Reset, which is a factory reset, and it removes all the data from the device, including photos, contacts, and apps, and you only use it as a last resort!
How to make Hard Reset on Xiaomi Redmi:
- Turn off the phone.
- Press the Power + Volume (+) buttons at the same time and hold for 10-15 seconds until the Recovery menu appears.
- Use the volume buttons for navigation and the power button to select "Wipe Data" (or "Clear Data").
- Confirm the action by selecting Yes.
- After reset, select "Reboot" to reboot.
πΉ What to do after a reset:
- π± Restore data from backup (if it was created through Settings) β Additionally. β Backup).
- π Re-connect your Mi Account to avoid future problems.
- π Install a new pattern lock and write it down in a secure location (such as Google Keep or Sync Notes).
β οΈ Note: Some Redmi models (e.g. Redmi Note 12 Pro)+) After reset, you may need to enter a password from the previously associated Mi Account. If you do not remember it, restore access in advance!
What if the phone asks for an old Mi Account after a reset?
6. Alternative methods: bypassing the lock via TWRP
For users with an unlocked bootloader and customized TWRP recaps, there is another way to edit system files manually, which requires technical skills and can lead to unstable phone performance.
πΉ What's the matter:
- π§ Unlocked Bootloader (checked by the fastboot oem device-info team).
- π± Established recaveri TWRP.
- πΎ Backup copy of section /data (Make it through TWRP change!).
Instructions:
- Load to TWRP (Put Power + Volume Up).
- Go to Advanced β File Manager.
- Find the file /data/system/gesture.key (or locksettings.db for newer versions of MIUI) and delete it.
- Reboot the phone.
β οΈ Attention: Incorrect actions in TWRP If you're not sure about your skills, you should go to the service center.
π‘
Resetting a pattern lock via TWRP is the most powerful, but also the riskiest method. Use it only if other methods have failed and you have a backup of the data.