Surely you know that it is necessary to do a factory reset on your device before selling it or exchanging it for another. This is as simple as going to Android system settings, General management, Reset, Reset to defaults. This process returns the device to its default settings and deletes all your data in the internal memory, including applications and games, something you will want to do if you do not want a third party to have access to your WhatsApp data, private photos or even apps and bank accounts . However, there are some details that you may not know but are important..
For example, on old devices with Android 5 and lower versions, even if you do a factory reset and all your applications and data are erased, these can be recovered by the person in possession of the computer using forensic data recovery software. It is for this reason that in these versions of Android it is recommended to previously encrypt the device before doing the factory reset. Encryption basically "scrambles" or "merges" the data with a key that the Android system requests before the process, so that even though it could be recovered later, it is simply "incomprehensible" or "unreadable" without the decryption key.
In Android 5 and lower versions it is advisable to encrypt the cell phone or its internal memory before restoring the factory settings, so that after this data deletion, the information cannot be recovered by the person who has the equipment..
From Android 6 onwards, manufacturers are obliged to offer "pre-encrypted" devices by default, so in this case it is no longer necessary to encrypt the phone before restoring data. In fact, current versions of Android no longer even have the option to "Encrypt device" for that reason. However, it is recommended that the device have a lock screen configured with a PIN or password (not a pattern or face unlock) so that this factory encryption is "associated" with that PIN or password and is more "robust". Once you have configured that lock screen you can proceed to restore the default values of the device.
Factory Reset Protection or FRP
Esta es una característica que se implementó en Android 5.1 en adelante y entra en efecto tras una restauración de fábrica. Solicita el usuario y contraseña de la cuenta Google que estaba registrada en el equipo antes de sufrir el formateo. La idea evidentemente es que el dispositivo quede inservible si ha sido robado. Esta es una funcionalidad que querrás desactivar si vas a vender o entregar tu Android a otra persona, para que no tenga problemas a la hora de configurar el dispositivo desde cero. Para ello, antes de restaurar el dispositivo deberás borrar tu cuenta o cuentas Google que estén registradas en el celular. También es recomendable que desactives la pantalla de bloqueo. Sí, antes dije lo contrario para evitar la recuperación de datos, pero si esa es tu preocupación, primero realiza la restauración con pantalla de bloqueo activada, y luego elimina tus cuentas Google, desactiva esta pantalla y realiza otra restauración..
More information about encryption on Android : Android.com
ENCRYPTING cell phone: What it is, what for and how to do it
How to restore the factory settings of your device
My Xperia adds 'Theft Protection' for some Sony Xperia