On some devices you are blocked from wiping data on Settings.apk in the gui.
This can still be accomplished via adb shell.
Start by connecting your phone, and verifying adb is working. Next we will connect to the phone directly by typing
You should notice the prompt changed to your device model name. I performed this from a Galaxy S7 Edge which I was provided for testing.
hero2qltevzw:/ $ pm list packages -f settings package:/system/app/USBSettings/USBSettings.apk=com.sec.usbsettings package:/system/app/SilentLog/SilentLog.apk=com.sec.modem.settings package:/system/priv-app/SecSettingsProvider2/SecSettingsProvider2.apk=com.android.providers.settings package:/system/app/ImsSettings/ImsSettings.apk=com.samsung.advp.imssettings package:/data/app/com.kasitskyi.hiddensettings-1/base.apk=com.kasitskyi.hiddensettings package:/system/app/SimSettings/SimSettings.apk=com.qualcomm.qti.simsettings package:/system/priv-app/SecSettings2/SecSettings2.apk=com.android.settings package:/system/priv-app/UnifiedSettingService/UnifiedSettingService.apk=com.samsung.unifiedsettingservice
Our goal with this command is to identify the package name used for settings. In this case, we can see Samsung’s settings app is SecSettings2.apk and that it’s package name is still the default
Now we still need to wipe the data for this application (yes settings is just a regular Android app). Also, in most cases your wifi and bluetooth settings will be preserved as they are actually part of another application you seamlessly jump into.
hero2qltevzw:/ $ pm clear com.android.settings Success hero2qltevzw:/ $
Once you reopen settings you will see the Developer options screen is gone.