Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b8e0a0c authored by Eric Biggers's avatar Eric Biggers Committed by Android Build Coastguard Worker
Browse files

Fix downgrades on device with FRP enabled

Unfortunately, non-forwards-compatible changes to the PasswordData
format break setting up an older version of Android on a device that had
Factory Reset Protection (FRP) set up on a newer version.

Commit 23070d87 ("Added changes for storing PIN length in
PasswordData") (http://ag/21983004) made a non-forwards-compatible
change to the PasswordData format by reusing the first two bytes of the
credentialType field as a version number.

Therefore, undo that part of the change, and just use the data length to
determine whether the new pinLength field is present or not.

Bug: 276780938
Test: atest com.android.server.locksettings
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2353f5a9bc31cdef9c4d5329bced9bb6c79fd14d)
Merged-In: Ibf3c91d14a0c6bd9af4403b080532f2739fde119
Change-Id: Ibf3c91d14a0c6bd9af4403b080532f2739fde119
parent c4d0fbc6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment