how can I prevent a factory reset of Samsung android device? The Samsung android table I got for my kid has a "Guest Account" feature that lets anyone in without a password. Kind of defeating the point of the password feature that keeps a 7 year old kid out at bedtime.

so I ran:

adb shell settings put global guest_user_enabled 0


with a USB cable attached and it worked. Now the guest account is gone. But all the 7 year old has to do is go into setting and do a factory reset and that will go back to

adb shell settings put global guest_user_enabled 1


Right?

How do I win this password war? I'm older. I have to win.
This happened after any android user hard reset its device. There is a security feature in every android device apart from "Kitkat Patch and Lower" which is FRP (Factory Reset Protection) that helps user data to be secured after a hard reset is performed. Now you may provide the right Google account details, if not then you need to break this FRP lock using an android application. Don't forget to follow the steps to recover your device completely.