It's similar in Canada; permanent residents and citizens have the legal right to reentry and it can't be denied. But that right applies to you, not anything you are carrying. Play that game and you'll probably lose the device to border security.
Losing the device in such circumstances is definitively the best outcome. There is a shit ton of data that these devices have and the law is so complex that you probably committed a crime somewhere without you realizing it.