I am using following adb shell command for unlocking the device screen.
adb shell input keyevent 82
This is working fine for My enterprise device which has Android L device. However, when I used this same command for device with Kit Kat OS, it is not working. The screen has a Lock icon and circle around it, and i have to swipe it up.
Please suggest if an alternate commands.
You can maybe detect the SDK version and if it is kitkat and below, you can use the below code to swipe.
SDK=`adb -s $i shell getprop ro.build.version.sdk | tr -d '\r'
if (( "$SDK" <= 19 )) ; then
adb shell input swipe 200 500 200 0
fi
You can tweak the parameters against swipe to get the exact start (x,y) and end (x,y) according to the screen you are using.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With