I ran into a similar problem entering the US on a ferry from the Bahamas.
I think I may have been misled but apparently if you're on the border you aren't allowed to refuse to talk/refuse searches/etc. So they forced me to search my phone and spent about 6 hours interrogating me about my political opinions, family history, etc.