Sz_DavidHUN

Members
Aug 5, 2016
1
13
I'll show you two solution.

If you logged in into MIUI account.
  • Reboot you phone into TWRP (sound up + power) (any recovery with file manager should be ok)
  • Select File Manager
  • Goto /data/system
  • Remove these files: gesture.key, locksettings.db, locksettings.db-shm, locksettings.db-wal (to remove click on them, then select delete)
  • Reboot the phone.
  • Change your pattern the normal way. It will ask for previous password, click the Forgot password option, enter MI profile password. The pattern is completely removed. Now you can add new password if you want, or leave it empty.
If you remove this files with something else (for example adb shell), then reboot, it should be ok. On android 4.0-4.4 device, this method worked. My MI4C prompts something before I can access the adb shell, so first i need to unlock the device.

If you haven't logged in into MIUI account, then
  • Download the attached zip.
  • Reboot your phone into TWRP (sound up + power) (any custom recovery should be ok)
  • Now you can copy the file to the phones storage.
  • Install it.
  • Reboot normally.
  • Enter any pattern, it will work.
  • Change the pattern normally.
I saw the second tutorial on en.miui.com forum (/forum.php?mod=viewthread&tid=122168), the first is made by me (unzipped the script file, to see what it does)

Tested on Xiaomi MI4C with MIUI EU Stable 7.5.4.0 with TWRP. Any android device should be work.
 

Attachments

  • pattern-resetter.zippattern-resetter.zip
    631.6 KB · Views: 3,425