One of the suggestions from this Feb 2017 article (which is excellent BTW) - is use a burner phone.
can US border agents search your phone
- Customs officers are legally allowed to search travellers’ personal electronics without a warrant – whether they’re visitors or American citizens.
- Travellers can refuse access to their devices, but customs officers are not obligated to allow someone into the country.
- For now, lawyers recommend that travellers carry burner phones, encrypt their devices, or simply not bring electronics at all.
Please note, I am NOT advocating for this in all or even most cases, I simply am making the suggestion of how to remain safe from such searches; If you have a serious concern
One way of doing this - would be to back up your messages (easy enough to do on a smartphone using an app to some cloud service provider OR to your SD Card) and then delete all messages on the phone.
For space-saving reasons I keep all my photos on an SD card anyway - So to turn your personal device into a "Burner" phone - pop out the micro SD card - put it in a bag or some other container and keep it in your pocket. THEN delete ALL accounts to social media & most especially to your email on the phone. Delete ALL contacts - EXCEPT for the one contact who will be picking you up/ you are going to meet 1st.
You will still have the same number - BUT your phone is largely at this point a "burner"
Once you have passed through customs/ border control - you can connect back to your social and email accounts - put your Micro SD back in and voila - like Austin Powers - your back baby...
While inside the USA - the police & ALL federal agencies are required to get a warrant before looking inside your phone.
In another article:
A Harvard student was denied entry
An incoming Harvard University freshman was refused entry to the
United States and had his visa canceled after customs officers spent
hours digging through his electronics and questioning him about his
religion and his friends, he told The Harvard Crimson.
Ismail Ajjawi, a Palestinian student who lived in Lebanon, told the
student newspaper that the customs officers at Boston's Logan
International Airport demanded he unlock his phone and laptop, then
spent five hours searching the devices.
"After the 5 hours ended, she called me into a room, and she started
screaming at me. She said that she found people posting political
points of view that oppose the US on my friend[s] list," Ajjawi told
the Crimson in a statement.
The denial was based purely on posts by friends on social media.
I can certainly empathise with your concern having in my youth been denied a visa when I was simply requesting one to transit the USA on my way to England. (This was in the days before Visa Waiver travel became a thing)
Good Luck!