The data wipe can be performed on a device depending on whether the device is rooted or stocked. The rooted device is an android based device in which you can access the root folders. An un-rooted device does not give you this privilege. In most cases the Android device out of the box is un-rooted, and you can make it rooted. The Stock Android device is the Android version of a stripped off version of the Android mobile operating system that is reduced to bare minimum.
If your android phone is rooted you can use the TWRP app loaded to recover the data in your Android device; you can use the Wipe menu of this app also. Both of these methods have the same level of protection from your data being compromised.
Stock Android Device:
The first step you want to follow while dealing with the stock android device is to encrypt it with the settings app that comes built into the Android device.
Once the data is encrypted in the stock Android device, go to the settings app, in the system menu tap “Backup & Reset.”