If you can’t do reset via settings, here is how to hard reset your device using phone keys.
Step 1. Switch off your phone
Step 2. Press together volume up and power button
Step 3. When Nokia logo appears on screen, release your finger from the power button but keep pressing volume up. You will reach to recovery screen as seen in the screenshot below.
Step 4. Select with volume keys “wipe data/factory reset” and press power key to confirm

If you can’t do reset via settings, here is how to hard reset your device using phone keys.
Step 1. Switch off your phone
Step 2. Press together volume up and power button
Step 3. When Nokia logo appears on screen, release your finger from the power button but keep pressing volume up. You will reach to recovery screen as seen in the screenshot below.
Step 4. Select with volume keys “wipe data/factory reset” and press power key to confirm
<img style="display: block; margin: 0px; padding: 0px; width: 0px;" width="0" height="0"><img style="display: block; margin: 0px; padding: 0px; width: 0px;" width="0" height="0">
Step 5. Select “yes” and press power to confirm
Step 6. Press power key to confirm “reboot”
Step 7. Wait until the phone restarts
This will delete all the data, so use with caution. If this doesn’t work for Nokia X, Nokia X+, Nokia XL

Nokia Software recovery tool:

If you are not able to hard reset and recover Nokia X2 using above method, you can still try Nokia Software recovery tool (NSRT). Here is how you can use Nokia Software recovery tool for Nokia X2.
In case your device is not responding and is not being recognized by NSRT, press together volume up and power button and see whether it is now identified.Step 1. Download and install Nokia Software Recovery Tool to your computer. If possible, make sure that your phone is fully charged.Step 2. Start Nokia Software Recovery Tool, and connect your phone to your computer with a compatible USB cable. If prompted, select the correct USB mode on your phone: Nokia Suite or Modem.

Note! Using Nokia Software Recovery Tool erases all personal content on your phone. If possible, create a backup of your phone’s content before starting the installation. You will find the instructions on how to backup and restore your data in your phone’s user guide.

Step 3. Follow the instructions shown on the tool. The latest version of your phone software will be installed, and your phone will restored back to the factory settings. This process may take some time depending on your internet connection, and you cannot use your phone during the installation.
If your phone is not starting or appears to be stuck, you can also recover your phone with My phone does not start up or respond option.