Android 设备:玻璃破碎无法输入锁屏密码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21690765/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 04:56:11  来源:igfitidea点击:

Android device: glass broken and not able to enter lock screen password

android

提问by user3295132

I have an Android device with a broken screen and no root access. The device is locked with a password which I cannot enter as the touch screen does not work anymore. Connecting a Bluetooth keyboard is not an option as the device does not have Bluetooth enabled. Also, connecting an USB keyboard is not possible as the device does not support it.

我有一台屏幕坏了且没有 root 访问权限的 Android 设备。设备被密码锁定,我无法输入,因为触摸屏不再工作。由于设备未启用蓝牙,因此无法连接蓝牙键盘。此外,无法连接 USB 键盘,因为设备不支持它。

Does anyone know a way to "inject" the password so that I can unlock the device and pull my personal data off so that I can have it repaired (and factory reset)? I have the current password, it's just not possible to enter it anymore...

有谁知道“注入”密码的方法,以便我可以解锁设备并提取我的个人数据,以便我可以修复它(并恢复出厂设置)?我有当前密码,只是不能再输入它了...

Is there a way to programmatically remote-control settings.apk and remove the password protection using some APK? (I could install it using adb sideload, listening for the BOOT_COMPLETED broadcast and automatically change the setting)

有没有办法以编程方式远程控制 settings.apk 并使用某些 APK 删除密码保护?(我可以使用 adb sideload 安装它,监听 BOOT_COMPLETED 广播并自动更改设置)

I know that this is a difficult story as it might be some kind of security breach, but I would also accept other solutions. It's just that I cannot think of any. Maybe Google already has taken this scenario into account and provides some more elegant way to accomplish this.

我知道这是一个困难的故事,因为它可能是某种安全漏洞,但我也接受其他解决方案。只是我什么也想不出来。也许谷歌已经考虑到了这种情况,并提供了一些更优雅的方式来实现这一点。

Does anyone have an idea how to get this job done?

有谁知道如何完成这项工作?

回答by Misha Nasledov

If you have USB Debugging enabled, you can try a few different tricks. First off, are you using a pattern or code? Looks like there's an easy way to reset the pattern and make it take any new pattern, but no way via ADB to then unlock it with pattern. And if your digitizer is messed up, I guess that doesn't help a whole lot.

如果您启用了 USB 调试,您可以尝试一些不同的技巧。首先,您使用的是模式还是代码?看起来有一种简单的方法可以重置模式并使其采用任何新模式,但无法通过 ADB 使用模式解锁它。如果你的数字化仪搞砸了,我想这没有多大帮助。

However, if you're not using pattern lock, looks like you can send key events to your phone via adb shell using the "input" command, e.g: $ input keyevent 26 # should turn on/off the screen

但是,如果您不使用模式锁定,看起来您可以使用“输入”命令通过 adb shell 将按键事件发送到您的手机,例如: $ input keyevent 26 # should turn on/off the screen

It's also possible to write a program to that listens to BOOT_COMPLETED and disables the keyguard I think.

也可以编写一个程序来监听 BOOT_COMPLETED 并禁用我认为的键盘锁。

Unfortunately it doesn't seem that anyone has developed any universal methods for this, much less ones that are up to date. Looks like someone had what you wanted in a CM7 ROM but they had "Menu Unlock" option enabled, so sending the Menu key event via ADB accomplished it.

不幸的是,似乎没有人为此开发出任何通用方法,更不用说最新的方法了。看起来有人在 CM7 ROM 中拥有您想要的东西,但他们启用了“菜单解锁”选项,因此通过 ADB 发送菜单键事件就完成了。

Sources:

资料来源:

http://www.addictivetips.com/android/how-to-bypass-disable-pattern-unlock-on-android-via-adb-commands/(see for how to reset your pattern)

http://www.additivetips.com/android/how-to-bypass-disable-pattern-unlock-on-android-via-adb-commands/(请参阅如何重置您的模式)

http://forum.xda-developers.com/showthread.php?t=1134978(for hints at how to disable keyguard entirely using a program you'd sideload)

http://forum.xda-developers.com/showthread.php?t=1134978(有关如何使用您侧载的程序完全禁用键盘锁的提示)

回答by Rijdzuan Sampoerna

have you tried Android Screencast? you can control your Android remotely from desktop

你试过Android Screencast吗?您可以从桌面远程控制您的 Android