Aaron Gach, a U.S. artist who's work features political themes critical of the government, was greeted with a Custom's interrogation upon returning from an art exhibition in Brussels. When he went through custom's inspection at San Fransisco International Airport, CBP officers pulled Aaron Gach aside to an examination room for and hour and a half. Two CBP officers coerced Aaron into unlocking his smart phone so they could search it, telling him that if he failed to comply they would 'seize' his phone and retain it for an indefinite period of time. Based on the questions they asked him, it's clear they didn't suspect him of carrying contraband and they weren't concerned about his legal status (Aaron had his passport and all required identification). They asked him such questions as what kind of art he creates, where he travels for his art exhibitions, who invited him to the art exhibit in Brussels, what hotel he stayed in, if he does magic (not kidding you), and they demanded the contact information of his business associates? After they forced Aaron Gach to unlock his phone under the threat of confiscating it, they scoured his personal data for ten minutes and refused to allow him to oversee their search in violation of their own policies. The search seems to have been politically motivated based on the type of questions the officer's asked and their behavior towards him. It is highly likely that they also downloaded the information on his phone, as they had promised to do at the outset of the interrogation. CBP policies give customs officers the authority to conduct arbitrary and capricious detentions, searches, and seizures. The fourth amendment was meant to restrain this sort of arbitrary and capricious exercise of power by ensuring, to the greatest extent possible, it was not motivated by personal bias or political dissent, but only the apprehension of crime. The Supreme court has already ruled that officers need a warrant before searching a suspect's cellphone in Riley v. California. If we are to be logically consistent and preserve our constitutional tradition (or what little is left of it) the same rule ought to be applied across the board.
You can read Aaron's full story here