Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unlock android phone through ADB

Tags:

android

adb

My screen is dead and I want to unlock my phone so I can access it through Kies to backup my pictures.

I locked the phone through Android Device Manager setting an easy password (was hoping for an Unlock option once I locked it) and tried various methods to unlock it for example:

adb shell input text 1234

Since I don't know what the lock screen look like I'm not sure of the correct inputs to unlock it.

I know the phone is on and that it responds to adb. I am also able to run apps on it through Eclipse. It's a Samsung Galaxy S5 with Android 5.0.

like image 802
schoel Avatar asked Mar 16 '15 08:03

schoel


People also ask

Can I unlock my Android phone from my computer?

No matter forgot the password, pattern lock, pin code, or fingerprint, DroidKit can reset and help you access locked phone on your computer. So you can unlock any phone password from a PC (Windows PC and Mac are supported). Besides, if you need to bypass FRP lock, DroidKit can also help you out.

What is the master code to unlock any phone?

What Is The Secret Code To Unlock Android Phone Password? The secret code to unlock Android phone is *#*#7780#*#* and is also known as Android reset code. With the help of this code, you can unlock your Android phone if you forget your PIN.


3 Answers

If you have to click OK after entering your passcode, this command will unlock your phone:

adb shell input text XXXX && adb shell input keyevent 66

Where

  • XXXX is your passcode.
  • 66 is keycode of button OK.
  • adb shell input text XXXX will enter your passcode.
  • adb shell input keyevent 66 will simulate click the OK button
like image 113
Tien Avatar answered Oct 13 '22 22:10

Tien


This command helps you to unlock phone using ADB

adb shell input keyevent 82 # unlock
like image 35
Bhaskar Avatar answered Oct 13 '22 22:10

Bhaskar


Tested in Nexus 5:

adb shell input keyevent 26 #Pressing the lock button
adb shell input touchscreen swipe 930 880 930 380 #Swipe UP
adb shell input text XXXX #Entering your passcode
adb shell input keyevent 66 #Pressing Enter

Worked for me.

like image 46
Yogeesh Seralathan Avatar answered Oct 13 '22 21:10

Yogeesh Seralathan