I wonder if smartphone vendors couldn’t provide a test mode which doesn’t require the unlock code for the phone. E.g. if I get my phone display replaced nobody needs access to my full personal data to test of the basics are working.
There could be a special mode accessible which allows testing of standard use cases.