How can I perform a factory reset on my device?

Warning: this action will erase all your personal information and downloaded apps.
We strongly advise that you back up your personal data to prevent loss of personal data. (Refer to Q How to back up my device data)
Please make sure the battery percentage is higher than 20%.
Remove your Google account from the device before performing a factory reset. (Refer to Q How to remove Google account from your device)
You can use the following steps to reset your device in the boot status.
a) Go to “Settings”.
b) Touch “System”
c) Touch “Reset”.
d) Touch “Factory data reset” to start.
e) Touch “RESET DEVICE” in the open window.
Factory reset while your device is in in Shutdown state.
a) Power off the device. Long press the “power” key and “volume up” key until enter the Android system recovery mode.
b) Press the “volume” key to select “wipe data / factory reset”(or “Yes” for some software versions), then press the “power” key to confirm factory reset;
c) Press the “volume” key to select “Factory data reset”, then press the “power” key to confirm the deletion of all user data;
d) When the factory reset is complete, press the “volume” key to select “reboot system now” then press the “power” key to confirm.