How to format an Android mobile and erase all its data
On a PC, it is relatively common to format the hard drive to start from scratch and perhaps make it go faster or get it ready to sell. The Android mobiles can also be formatted in your own way, albeit more of an old-fashioned erase than a classic PC formatting.
If you want to format a mobile to restore it from the factory or prepare it for sale, we will tell you how you can do it. The process is simple, although it consists of two steps sif your mobile has a MicroSD card and you also want to format it.
Format the SD card
If your mobile has a MicroSD card, you probably want to format it as well. Unlike the internal storage, which is … internal, the MicroSD card is removable and, therefore, you can remove it from your mobile, connect to a PC and format as usual. You can also format from the mobile itself. It is recommended that you do this before formatting the internal storage.
To format the MicroSD card of an Android mobile, you must go to the system settings and tap on Storage. Then touch on the name of the MicroSD card in the section Portable storage. In the file manager that opens, tap the menu button ⋮ and choose Storage settings.

This will open a window of memory card information, which includes the total and available space, as well as one or two buttons, depending on whether the mobile accepts formatting cards as internal storage.
If you want to format the card so that it remains independent of the mobile (that is, you can take it out and use it on other devices), then tap on Format. A confirmation window will then be displayed where you must click again on Format SD Card.

This will erase all data from SD memory and will format it with the settings recommended by Android. The result is basically the same as if you remove the card, connect it to a PC and use the usual format command.
Format the Android mobile
If you want to do the same, but with an Android mobile, the operating system technically calls it factory wipe or restore. In practice, it is exactly the same: return the storage to its original state, that is, delete everything.
To format the internal storage of an Android mobile, you must enter the Settings and touch the section System. Then enter Recovery options and press Return to factory state (clear all). Note that different layers of customization may call the option slightly different or change places.

Then, the mobile shows you a summary of everything that is going to be erased from the mobile and that includes the configuration of the accounts, the data of the applications and anything else that is in the internal storage of the mobile. A list of the accounts in which the mobile is logged in is also included.
If you are going to sell the mobile, it is recommended that you remove your Google account before continuing, as you will be asked to log in when you reconfigure the terminal as a protection measure. If you are going to continue using it yourself and you were going to configure it the same, then it is not necessary: press Clear all data.

A new confirmation window highlights that you will not be able to undo this action. If you agree, press Clear all data and wait for the process to finish. Afterwards, the mobile will restart and, when you return, it will be as it left the factory.