A sureshot way to fix this would be to factory reset your device. I understant that you've already tried it from settings while the OS is booted and running. You could try factory resetting it from the stock recovery.
This Google help page will help you with what needs to be done. But do remember - everything in your internal storage will be wiped clean.
Reset device in Recovery mode
Before you begin
If your device is running Android 5.1 or higher, your device is protected to prevent other people from using it if it's been reset to factory settings. To ensure that it's really you doing the reset, you'll need to enter a Google username and password associated with the device after factory reset. If you don't have this information, you won't be able to finish the setup process and use the device at all after factory reset.
You'll also need to:
Wait 72 hours if you recently reset your Google account password
Make sure you have an Internet connection
Back up your data to your Google Account and be ready to restore
To do a factory data reset, follow these steps:
- If your phone is on, turn it off.
- Press and hold the Volume up button and the Power button at the same
time until the device turns on.
- Press the Volume down button to select "Recovery mode." If you need
to navigate to the "Recovery mode" option, use the Volume up button
to move the arrow and the Volume down button to select it.
- You’ll see an image of an Android robot with a red exclamation mark
and the words "No command."
- While holding down the Power button, press the Volume up button and
- Use the volume buttons to scroll to "wipe data/factory reset" and
press the Power button to select it.
- Scroll down to "Yes - erase all user data" and press the Power
button to select it.
Your Android One device will erase all of your data and restart with its factory settings. You'll see the Welcome screen just as you did when you turned the device on for the first time. When you're done with the setup process, follow these steps to restore your data.
Note: If your phone becomes unresponsive at any point during these steps, you can restart it by holding down the Power button for several seconds. If that doesn’t work, try taking the battery out and putting it back in and starting the steps again.