1

I just tried to remove the boot password on a Android Oreo device using the following command:

$ vdc cryptfs changepw password original_password ""
200 5478 0

Even though the status indicated success (I've previously used this command to change the password without problems), the device does neither accept the original password nor does it boot without putting in a password. The password prompt still shows up.

I'm pretty sure this is only recoverable with a factory reset. (I'll still gladly take alternative hints on how to unlock this ;-))

My question is: How can I remove the boot password using adb without making the device unbootable?

vdc cryptfs clearpw seemed to me, like it would to the job. After reviewing the source, I found out, that it unfortunately only removes the password from memory. I've also tried setting the password to default_password. This leads to the password still being required on bootup.

1 Answer 1

2
vdc cryptfs changepw default current_password default_password

does the trick. Replace current_password with the real current password.

I believe the new password specified is irrelevant, as the DEFAULT_PASSWORD constant is used anyway. However, the current password seems to be required, atleast when using hardware-based encryption. (see https://github.com/LineageOS/android_system_vold/blob/61a3249612495e7a5b2a1950859e9eb43dfc4559/cryptfs.cpp#L2858)

2
  • What would this change the password to, since you say the DEFAULT_PASSWORD constant is used anyway? Or would it simply remove the password?
    – confetti
    Commented Aug 6, 2018 at 21:25
  • From a theoretical standpoint, it sets the password to 'default_password', and the password type to 'default'. In practice, there is no password anymore when booting the phone.
    – Zulakis
    Commented Aug 7, 2018 at 8:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .