Really, for non-Americans the best advice is just don't go in the first place. Second best advice is just comply with border security personnel.
Any tricks like leaving the battery empty, bringing a burner, not bringing a laptop and getting a loaner when you get there etc, they do nothing but raise suspicions.