Depends on the circumstances. If you've been in a wreck and you're unconscious on the ground, they'd have an excellent exception to warrantless search to check your phone for emergency contact information or info to identify you.

Or, if some other person who would typically have access to the electronic device, for example, a boy/girlfriend who shares a computer at home with you, then THEY may be able to give permission for such a search.

Beyond that, a warrant is likely required, but there are too many potential exceptions; so it's not really a "yes or no" question.