Unlock Android Device(Through Password Pattern)

Hi All,
I want to unlock my android device through Password Patter “Z”(Format).I am able to press the power on button , but while swiping 'Z ’ i am facing issues.
I have Used the following apporach:-

adb devices
adb shell input keyevent KEYCODE_POWER

adb shell input touchscreen swipe [(220,615),(386,628),(386,628),(295,720),(295,720),(230,795),(230,795),(372,810)]

We’ve had this discussion on this forum before: How to unlock the pattern locked device through appium? Perhaps you can glean some information from that

I see you’ve posted on this topic two weeks ago: Appium Password Pattern

And it looks like you used to try to do this:


What strikes me as odd here is that your Y coordinates should not be changing on the first and third swipes, but yours do. Similarly, the X coordinates in the first and third swipes should be the same. I also wonder if it would be safer to have six swipe actions to make certain the lock pattern registers the middle column – perhaps you don’t need that if your coordinates are more precise

Hi Willposeer,

Thanks for the answer.
i think the patter would be poossible through relative coordinates.Can u plz help me out with that …
I dont know how to find relative coordinates .

@Tanuj You can do it in ADB.
Use getevent to record your manual input with:

adb shell getevent
Or to record a specific device:

adb shell getevent /dev/input/eventx
Then simuate recorded input with:

adb shell sendevent /dev/input/eventx