How to unlock android phone through ADB

后端 未结 12 1152
自闭症患者
自闭症患者 2020-12-12 15:04

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 e

相关标签:
12条回答
  • 2020-12-12 15:23

    Below commands works both when screen is on and off

    To lock the screen:

    adb shell input keyevent 82 && adb shell input keyevent 26 && adb shell input keyevent 26
    

    To lock the screen and turn it off

    adb shell input keyevent 82 && adb shell input keyevent 26
    

    To unlock the screen without pass

    adb shell input keyevent 82 && adb shell input keyevent 66
    

    To unlock the screen that has pass 1234

    adb shell input keyevent 82 && adb shell input text 1234 && adb shell input keyevent 66
    
    0 讨论(0)
  • 2020-12-12 15:23

    If you want to open your phone without touching it here is the way

    Steps

    1. Make sure you have completed the adb setup in both pc and android
    2. open cmd(Command Prompt)
    3. type adb devices to cheek if your phone is ready or not
    4. If it shows something like
    List of devices attached
    059c97f4        device
    

    then enter the following command

    adb shell input keyevent 26 && adb shell input swipe 600 600 0 0 && adb shell input text <pass> && adb shell input keyevent 66
    

    put your password in <pass> and done. You phone is hopefully opened

    0 讨论(0)
  • 2020-12-12 15:24

    Slightly modifying answer by @Yogeesh Seralathan. His answer works perfectly, just run these commands at once.

    adb shell input keyevent 26 && adb shell input touchscreen swipe 930 880 930 380 && adb shell input text XXXX && adb shell input keyevent 66

    0 讨论(0)
  • 2020-12-12 15:27

    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
    0 讨论(0)
  • 2020-12-12 15:27

    If you have USB-Debugging/ADB enabled on your phone and your PC is authorized for debugging on your phone then you can try one of the follwing tools:

    scrcpy

    scrcpy connects over adb to your device and executes a temporary app to stream the contents of your screen to your PC and you're able to remote control your device. It works on GNU/Linux, Windows and macOS.

    Vysor

    Vysor is a chrome web app that connects to your device via adb and installs a companion app to stream your screen content to the PC. You can then remote control your device with your mouse.

    MonkeyRemote

    MonkeyRemote is a remote control tool written by myself before I found Vysor. It also connects through adb and lets you control your device by mouse but in contrast to Vysor, the streamed screen content updates very slow (~1 frame per second). The upside is that there is no need for a companion app to be installed.

    0 讨论(0)
  • 2020-12-12 15:31

    This command helps you to unlock phone using ADB

    adb shell input keyevent 82 # unlock
    
    0 讨论(0)
提交回复
热议问题