android twrp_从TWRP Android备份还原后如何修复PIN错误

android twrp_从TWRP Android备份还原后如何修复PIN错误

android twrp

android twrp_从TWRP Android备份还原后如何修复PIN错误

Making TWRP backups is a must if you’re going to be rooting and tweaking Android. But if your phone is encrypted, you may have some issues with your PIN or password lock after restoring from a backup. Here’s what’s going on.

如果您要扎根和调整Android,则必须进行TWRP备份。 但是,如果您的手机已加密,则从备份还原后,您的PIN或密码锁定可能会出现问题。 这是怎么回事。

If the backup you’re restoring uses the same PIN as your current system, everything should go swimmingly. However, if the system you’re restoring to uses a different PIN than the system you’re restoring from, you may run into some quirks. When you reboot your phone, it’ll ask you for a PIN, saying “PIN required when you restart device”. In some cases, you’ll have to enter your latest PIN when you boot, and your old PIN to get into your phone. In other cases, you may not be able to unlock your phone at all. But don’t panic: in both cases, this is easily fixable.

如果您要还原的备份使用与当前系统相同的PIN,则一切应该顺利进行。 但是,如果要还原的系统使用要还原的系统不同的PIN,则可能会遇到一些奇怪的问题。 重新启动手机时,它将要求您输入PIN码,并说“重新启动设备时需要输入PIN码”。 在某些情况下,启动时必须输入最新的PIN码,而旧的PIN码才能进入手机。 在其他情况下,您可能根本无法解锁手机。 但是不要惊慌:在两种情况下,这都是很容易解决的。

如果设备使用两个PIN或密码卡住 (If Your Device Is Stuck Using Two PINs or Passwords)

After restoring from backup, you may find that your device accepts two PINs: your most recent PIN at boot, and your old PIN (from the backup you restored) for unlocking the device. This isn’t a huge problem, but can be confusing since you need to remember both PINs. Thankfully, the solution is simple: Just reset your PIN in Android’s settings.

从备份还原后,您可能会发现设备接受两个PIN:启动时的最新PIN和用于解锁设备的旧PIN(来自还原的备份)。 这不是一个大问题,但可能会引起混淆,因为您需要记住两个PIN。 值得庆幸的是,解决方案很简单:只需在Android设置中重置PIN码即可。

Head to Android’s Settings app and go to Security > Screen Lock. From there, tap on PIN or Password to choose a new PIN or password to lock your phone.

转到Android的“设置”应用,然后转到“安全”>“屏幕锁定”。 在此处,点击PIN或密码以选择新的PIN或密码来锁定手机。

android twrp_从TWRP Android备份还原后如何修复PIN错误

After doing so, that is the PIN or password you will use for everything–at boot and at the lock screen.

之后,这就是您将在启动和锁定屏幕上用于所有操作的PIN或密码。

如果您的设备根本无法解锁 (If Your Device Won’t Unlock At All)

Here’s where things get really dicey. In some rarer cases, your most recent PIN will work at boot, but no PIN will work to unlock the screen–meaning you can’t access anything on your phone. Thankfully, this is fixable too–it just takes a few more steps.

在这里,事情变得很轻松。 在极少数情况下,您的最新PIN码在启动时会起作用,但没有PIN码可用于解锁屏幕,这意味着您无法访问手机上的任何内容。 值得庆幸的是,这也是可以修复的–仅需要多做几个步骤。

First, boot back into TWRP’s recovery environment. It’ll likely ask you for a password–enter your most recent working PIN (the one you were using before you restored from backup). If you didn’t have a PIN, type in default_password. You’ll be greeted with the main TWRP window.

首先,重新启动到TWRP的恢复环境。 可能会要求您输入密码-输入最新的可用PIN码(从备份还原之前使用的PIN码)。 如果没有PIN,请输入default_password 。 TWRP主窗口会打招呼。

android twrp_从TWRP Android备份还原后如何修复PIN错误

Then, head to Advanced > File Manager, and go to the /data/system folder. Scroll down and find the two files with  the .key extension. Delete both of them (by tapping on the file and then tapping the “Delete” button). Then, delete all the files containing the word locksettings.

然后,转到“高级”>“文件管理器”,然后转到/ data / system文件夹。 向下滚动并找到两个扩展名为.key文件。 删除它们两个(通过点击文件,然后点击“删除”按钮)。 然后,删除所有包含单词locksettings的文件。

So on my Nexus 5X, for example, I deleted the following files:

因此,例如在Nexus 5X上,我删除了以下文件:

  • password.key

    password.key

  • pattern.key

    pattern.key

  • locksettings.db

    locksettings.db

  • locksettings.db-shm

    locksettings.db-shm

  • locksettings.db-wal

    locksettings.db-wal

android twrp_从TWRP Android备份还原后如何修复PIN错误

Once you’ve deleted all the key and locksettings files, reboot your system. If it asks you to install SuperSU, choose “Do Not Install”.

删除所有**和锁设置文件后,请重新启动系统。 如果要求您安装SuperSU,请选择“不安装”。

You may be prompted for a PIN before your phone finishes booting. Once again, it should work with your most recent PIN–the one you were using before you restored from backup.

手机完成启动之前,可能会提示您输入PIN。 再一次,它应该与您最近的PIN(从备份还原之前使用的PIN)一起使用。

Once Android starts, your lock screen should appear, with no PIN or password prompt. Unlock your phone (yay!) and head to Android’s Settings. Scroll down and go to Security > Screen Lock. From there, you can choose a new PIN or password to lock your phone.

Android启动后,您的锁定屏幕应该会出现,并且没有PIN或密码提示。 解锁手机(可以!),然后转到Android的设置。 向下滚动并转到安全性>屏幕锁定。 在这里,您可以选择新的PIN或密码来锁定手机。

android twrp_从TWRP Android备份还原后如何修复PIN错误

After doing so, that is the PIN or password you will use for everything from here on out.

之后,这就是您将要使用的PIN或密码。

翻译自: https://www.howtogeek.com/240657/how-to-fix-pin-errors-after-restoring-from-twrp-android-backups/

android twrp