It is the same advice that cops give to young black men in “the talk”. Comply, don’t get killed, hire a lawyer and fight injustice in court.
You have the right to refuse to unlock your phone as far as I know. You do not have the right to refuse lawful orders. So you cant resist being arrested or being searched, or them taking your stuff but you can refuse to answer questions, you don't have to tell them anything, whether that is the best plan of course varies.
But in general you don't know what they know, where their questions are leading, what minor detail in your answers may corroborate your "guilt" or minor inconsistencies may be construed as lying and obstructing.
So you are in general better off not answering police questions.
That of course excludes questions you are legally obligated to answer. Which in the specific case of CBP interactions is most questions.
You should also always keep in mind what the consequences of your actions are don't commit a felony to avoid a misdemeanour, in the case in the article if this guy had child sexual abuse material on his phone, or chats conspiring to commit major felonies his call was probably the right one. If his phone was clean and he was being adversarial, he chose poorly.
You have to try to strike a balance between being respectful, generally agreeable and cooperative while exercising your rights.
With CBP, we are in a gray zone. It is hard to know what to do.
Thanks for that, it's been a few years and I'd forgotten about this.
<https://www.usenix.org/system/files/1401_08-12_mickens.pdf> (PDF)
Truth-in-parody.
Probably even more suspicious if you make sketchy excuses when the truth is fine. I’d go with “I (or %COMPANY%) figure electronic devices get imaged at borders or potentially stolen abroad, so we don’t carry them when we travel.” Blame the other country you’re coming from if you want.
Although I’d just not carry a phone across a border in the first place.
Related, regarding the “hiding a partition on a thumb drive” thing (8 days ago, 287 / 166; project is cool but note that tptacek and others in the comments know what they’re talking about):
https://news.ycombinator.com/item?id=48974862
And the immortal words of James Mickens come to mind:
https://www.usenix.org/system/files/1401_08-12_mickens.pdf