Let me start off by saying this isn’t legal advice, you should consult an attorney if you have legal question. That said, the US Supreme Court recently ruled in Riley v. California that police do need a warrant to search your cell phone, so you are within your rights to refuse to unlock your phone and show the contents to police. However, there are two ambiguities that I know of.
First, there was a recent decision in a Virginia Circuit Court that held that criminal defendants did have to unlock their devices that used a fingerprint lock. The distinction relies on earlier decisions that held that criminal defendants did have to provide physical evidence (blood samples, fingerprints, etc). This decision is not controlling precedent, however it should be a warning to use a different method to lock your device so that you are on firmer legal ground.
The second issue, and one I have not seen addressed as fully, is that within border areas, you may be forced to unlock your device upon any reasonable suspicion. Known as the Border Search Doctrine, this pretty much eliminates most of your protections against search and seizure. But I’m not crossing a border, you might say. Perhaps not, but the “border area” is not clearly defined, and it has been considered to be up to 150 miles from the actual border in the past. Think about that...scary eh?
The EEF has a good guide for protesters that specifically addresses smartphones and other electronic devices. You can read it here: