I have an Android device whose LCD is broken. The unit functions and receives call, messages and gives the usual audio notifications.

However, in order to synch back data, I need to access the main memory. However, the screen is locked via a pattern. ADB does see the device, but as unauthorised.


macbopr: adb shell rm /data/system/gesture.key
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.

How can I overcome this block?


If you need to unlock the screen, you can use the adb shell input command.

This link is a script that you could modify. I haven't tried it myself, but it looks like it should work. You'll have to tweek it for your specific device, and enter in your password.

  • the adb shell inputcommand leads to the same error: device unauthorised error. are your two paragraphs related? – Jerome Nov 30 '17 at 18:26
  • The script runs the adb shell input command multiple times. So yes, they would be related. Would something like this work? stackoverflow.com/a/36507415/3893224 I've really only done this with devices that I already gave permission on, or on rooted devices. – Jacob Holloway Nov 30 '17 at 20:18
  • I believe I had rooted this phone, but why would I trust my memory ?! I also think I activated USB debugging, but that too is prone to memory leaks... Rebooting into recovery mode does not change any behaviour... still seen as unauthorised. – Jerome Nov 30 '17 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.