1

After checking some answers:

Is there a way to unlock android phone via adb, if I KNOW the pattern and Unlock Screen Galaxy Nexus ADB

Im trying to unlock a pattern using adb commands using this script https://github.com/mattwilson1024/android-pattern-unlock/blob/master/unlock.sh (for automation purpose).

Unfortunately the events arent working but I noticed that if I turn on the screen by myself (without using adb shell input keyevent 26) while the script is running, the events work and the pattern unlock.

Could someone explain me why this is happening and if there is another way to unlock patterns? maybe without using events (like I wrote before is for automation purpose, not for a phone that was locked).

Community
  • 1
  • 1
Jonathan
  • 37
  • 1
  • 4

2 Answers2

1

Can you please try following capabilities in your code?

We can use capabilities, where we can directly set the unlockType and unlockKey..

unlockType: ['pin', 'password', 'pattern', 'fingerprint']

unlockKey; If you want to draw suppose 'L', then it would be 1478 in key section.

Let me know if this doesn't work.

Appium version - 1.6.4

Reference - https://github.com/appium/appium-android-driver/blob/master/docs/UNLOCK.md

This feature is available in latest appium release.

thisisdude
  • 543
  • 1
  • 7
  • 31
-1

If you, for some reason, need to use Matt Wilson's script, this is not going to help you, but if your goal is to unlock your phone with a pattern lock via your computer, try Vysor, a Chrome extension that displays your phone's screen (including the lock screen) on your computer, allowing you to enter your lock pattern using the mouse or (if you have a touch display) your finger. For me, it worked fine, as I explain in more detail here.

Community
  • 1
  • 1
Christoph
  • 411
  • 5
  • 9