See Back Up an Android Phone on the Google Cloud for instructions on backing up your Android contacts. See Back Up iPhone Contacts for instructions on backing up contacts on an iPhone.

Connect your iPhone to the wall charger and to a Wi-Fi network. Open the Settings app and select “iCloud. " Tap “Backup” and then tap “Back Up Now. " You may have to toggle “iCloud Backup” on first. Wait while your iPhone backs up your essential data to iCloud.

Connect your Android to your computer using the USB charging cable. Select “Transfer media files” from the USB menu that appears in the Android notification panel. Open your Computer/This PC window on your computer and then open your Android storage. If you’re using a Mac, you may need to install Android File Transfer. Find the files you want to save. You can check your Downloads, Pictures, Music, and other folders for data that you may want to save. Copy these files to your computer to back them up.

See Transfer Photos from Android to Computer for instructions on backing up your Android pictures. See Download Photos from Your iPhone to a Computer for several ways to back up pictures from your iPhone.

See Back Up SMS for a Samsung Galaxy Device to Your Computer for instructions that apply to all Android devices. Your iPhone backs up your messages to your iCloud account. When you log in after resetting your phone and restore your iCloud backup, the messages will be restored.

When setting up the phone, log in with your Google account to restore your apps and settings. Check out Get-Rid-of-an-Old-Cell-Phone for tips on getting rid of an old Android phone.

You may be prompted for your screen passcode and your restrictions passcode, if you have one.

Make sure to leave your phone plugged in during the entire process, and don’t hold the power button while the phone is resetting.

If you are giving away or selling your iPhone, you’ll need to disassociate it from your iCloud account. This will allow the new owner to activate and access the phone. If you don’t deactivate, the next owner will not be able to use the phone at all. Visit icloud. com/#settings, click the phone you are getting rid of, then click the “X” next to the phone in the list. See Get-Rid-of-an-Old-Cell-Phone for more details on recycling your old iPhone.