Are they arresting you?
Because they have to let you in.
Are they arresting you?
Because they have to let you in.
What if you say you forgot? I actually had times (after not having used my phone for a month or two) that I (& my muscles) forgot my PIN (not for the SIM card) and I had to do a factory reset.
An Immigration Officer may search you until they are satisfied you are a citizen. As long as you have a passport (or emergency travel document) listing you a citizen, this should be straightforward and they're unlikely to have grounds for any further search. At that point, you have been let into the country.
Customs Officers are much more likely to have grounds for a search — if they believe you are bringing prohibited material on the electronic device into the country (and "reasonable grounds" is low, as it typically is for customs — "you're acting kinda sus" is a reasonable ground), they can search your device. It is an offence to refuse a search, so while you've been admitted to the UK, you could be arrested for that offence.
This is all broadly comparable to most other countries immigration and customs laws; the UK is not an outlier here.
The problems with the UK are primarily things that apply to everyone, not just at the border — for example the Terrorism Act 2000 and Regulation of Investigatory Powers Act 2000. But again, in the border case — that's basically all going to be _after_ you are admitted to the UK.