How to disable PIN lock in android device without touching it My android phone (Sony Xperia Z2) has a PIN lock, and now the screen is broken, everything is working fine except touch, I can't do anything because I can't unlock the phone because I can't press the buttons to unlock it. So is there a way I can unlock the phone with? Even if the touch isn't working I can use the phone with Google Assistant.

PS: My phone doesn't have root.
So when you say broken screen, but then "everything is working except touch", does the display work?

Below I've written a solution that'll work with a broken display and touch, if your display does work, then just use an OTG adapter and a mouse, if not follow the steps below.


Get an OTG adapter with a mouse
Make a screenshot (probably power + vol down)
Connect your phone to your PC and view what's in view what's in /sdcard/DCIM/Screenshots/
Continue doing that to go into Settings > Developer Options and enable USB Debugging (it's painful, but the only way)
After you've done that you can use scrcpy to mirror your screen to your PC via adb and interact with it. (The first time you use your PC with adb you'll get a prompt to authenticate on the phone you'll have to click allow there, just keep that in mind)