Access to settings denied

I don’t remember specifically how I fixed it on my Note 3 but now I can’t fix it on my S6. In the advanced settings, deny phone setting access is checked. I forgot to uninstall anti-theft and I did an downgrade-upgrade. I tried installing the Play Store Version, that installed. Couldn’t install the root version because Unknown sources needs to be enabled in settings (which I can’t access, that’s why I’m making the post). Tried doing the removal wizard. In Hard Reset protection I can’t select either one.

To summarize, I can’t access settings. Everytime I try to get into settings it’ll show “Unfortunately, Settings has stopped” and that’s because I didn’t uninstall avast! anti-theft before restoring my phone. Please email me. I need to fix it immediately

Can you connect your device to the computer and is it visible by adb? Or can you install new application with Google Play?

I don’t really know what adb is. But I can access Play store. I can uninstall and install apps from the play store. Again… the problem is solved. I had my brother uninstall and reinstall avast! Mobile Security and the anti-theft. And when I got to check up on it the settings was accessible.
I think that’s how I was able to fix the same problem on my other phone. Uninstalling and reinstalling avast! Mobile Security. Restoration of avast from Titanium backup may have been faulty or triggered the deny settings…

Mobile security has nothing to do with blocking the settings, antitheft does and you probably set is there by yourself, so antiheft just did what have been asked to do. The issue could be that settings are still inaccessible after right PIN is provided. Is it this case?

Yes that is the exact problem

Do you know the PIN you chose when you first installed it? If so send this sms to the phone: SET PROTECTION 0

For example if your PIN is 2222 then send this sms to your phone: 2222 SET PROTECTION 0

This should disable Avast Anti-Theft allowing you access to settings again.