Would he have been better off just refusing to give a code?
Yes. They'd probably have kept the device for a while, but he wouldn't be in legal trouble.
Yes. They'd probably have kept the device for a while, but he wouldn't be in legal trouble.