mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 21:37:44 +00:00
VtsHalWeaverTargetTest always overwrote the first and last Weaver slots.
Before Android 14, apparently this didn't cause problems because Android
didn't use Weaver for users that never had an LSKF set. However, now
users get a Weaver slot right away. That typically means that the first
Weaver slot will be used by user 0.
Fix the test to read /metadata/password_slots/slot_map to determine
which slots are in use by the system, and only write to unused slots.
Bug: 291284381
Test: 'atest -v VtsHalWeaverTargetTest'. Checked for INFO messages
showing that slots 1 and 63 were used by the test. Then rebooted
and verified that the device can still be unlocked.
Change-Id: Id2cce4240d68999471e7d1e8fc7a8449587eed97
(cherry picked from commit 31380e7bc9)
Merged-In: Id2cce4240d68999471e7d1e8fc7a8449587eed97