How to safety sell your smartphone

What you should before ditching your old device to ensure your personal information is erased.