⚠️ Steps:-
1️⃣ Connect your android phone to you computer.
2️⃣ Open Command prompt administrator.
adb shell cd/data/data/com.android.providers.settings/databases sqlites settings.db update system set value=0 where name=’lockpatternautolock’; update system set value=0 where name=’lockscreen.lockedoutpermanently’; .quit
4️⃣Now
you can reboot your phone and now when your android starts again, then try unlocking it using any random pattern and it will unlock and work pretty fine.
5️⃣ If you face any problem repeat same steps but instead of the above code use this tru using adb shell rm/data/system/gesture.key and the press enter and now reboot your device to see if it works.