Could you not backup your device, wipe it at the border, and then when they request the password simply say "There is no data on the device. Its as it comes from the factory" and hand it to them?
You could then perform an over the air recovery once safely away from the border.
The whole point is that sort of thing shouldn't be necessary. The government shouldn't have the authority to demand you hand over the contents of your phone/laptop without reasonable suspicion in the first place.
I'm not saying it should be necessary. It SHOULDN'T be. I shouldn't have to pay $100 every 5 years for Global Entry/PreCheck even though I'm already not a risk on the air transport network, but I do because the time savings is ridiculous.
What I'm saying is: Can X be done until sanity has been restored to Y? It appears that, yes, it can.
I do this (reset and reformat to factory spec) with my phone and my laptop every time I cross a border. On the other side I download a TrueCrypt file which has everything (and only what) I need whilst abroad. I started doing this in 2010, after my phone got taken into another room for a half hour at Ben Gurion in Tel Aviv in 2010.
The problem I'm having is that I have a ton of widgets and custom settings on my phone (Android). If I were to wipe my phone before crossing a border, it would take quite a while to get it set up the way I like on the other side.
I am just using stock android though. I wonder if there is a way to achieve what I want with a rooted phone.
You can completely backup most apps and your sdcard with adb on an unrooted phone [1]. The tricky ones are apps like Google Authenticator, which disable adb backups. You have to be patient and not use your phone for a while. It takes a long time. If you root, a nandroid backup is the way to go.
To answer my own question, it looks like rooting and then using a custom recovery like ClockWorkMod or TWRP is the way to go for a true whole-system image.
Yes, you can do that, and many business people now do exactly that when flying in/out of the US knowing that any data they carry across the US border is fair game.
China too - a friend’s dad works in chip manufacture & flies regularly from the UK to China - he leaves his personal phone at home and gets issued a new phone by his company every time he goes, which is wiped when he returns.
I know a few people who've worked at (different) places which have a rule that says "any hardware you've taken to China is never allowed on the corporate network again". They get "burner" laptops and phones before leaving, and dispose of them when they come home (usually by giving them to family/friends or selling them on eBay).
If you have an Android device and you automatically upload pictures, doing a factory reset before crossing a border will remove all your data. Then all you need is an empty/dummy Google account, in case you are asked to log-in.
Just make sure you wipe it before you cross. If you try to do it after they've asked you for the password I'm sure they'd consider that obstruction too.
You could then perform an over the air recovery once safely away from the border.