How to wipe your phone clean before you get rid of it

This post is inspired by the check I got from Gazelle today for selling my iPhone 5. What you should do before you get rid of your old phone to make sure you leave no valuable information on it.
Before you start:
- Back up all your data, including contacts
- Remember to remove the SIM card and any external storage such as a microSD card
- Log out of services like email and social media, then clear the data from these apps if you can
- Perform a separate encrypt and wipe of data on the microSD card as well if you don't plan to use the card in a new device
- Keep the serial number of the phone or tablet on file for your records.
Android
Lexy Savvides/CNET
The simplest way to wipe your Android device is to perform a factory reset. However, this often only clears data at the application level, and other information such as SMS and chat messages can be restored with some standard data recovery tools.
Instead, CNET's Dan Graziano has a full rundown on how to effectively wipe data on your Android phone or tablet which begins with encrypting your device first through the Settings menu.
You won't need any special tools, just a bit more patience than simply pressing the restore option within the settings.
Once the wipe is complete, remember to also revoke access to the phone from services such as Facebook and Google. To remove devices from your Google account, head to security.google.com/settings/security/activity, click on the model you have wiped, and press Remove next to the Account Access option.
iOS
Apple devices that support iOS 5 or later include hardware encryption when you set a passcode. If you perform a wipe using the method below, the encryption key is also overwritten which makes it very difficult for anyone who wants to recover the data.
Step one: Before starting the reset process, make sure to turn off all services, starting with Find My iPhone. Do this by heading to Settings > iCloud > Find My iPhone. Enter your Apple ID password when prompted.
Step two: Sign out of iCloud completely. Head to Settings > iCloud and find Sign Out at the bottom of the page. For iOS 7 devices, choose Delete Account.
If you delete all your data manually without signing out of iCloud, it will also delete the content from iCloud as well -- which is something you definitely don't want.
Step three: Turn off and sign out of other services including iMessage and Apple ID.
For iMessage, go to Settings > Messages > toggle the iMessage option. For your Apple ID, go to Settings > iTunes & App Store > tap your Apple ID email address and then Sign Out.
For added peace of mind you may also want to sign out individually of any other linked services and apps, such as Facebook or Twitter.
Step four: Start the wipe process. Go to Settings > General > Reset > Erase All Content and Settings. Confirm the selection.
Step five: If you have registered your device with Apple by its serial number, remove it from your support profile by logging in with your Apple ID at supportprofile.apple.com
Reader Comments