Hello, I'm having the same problem. The weird thing is that at work, it has no problems, but at home it keeps restarting. So it may be something related to the WiFi configuration. I inserted the code but it gives me a pop-up notice: "EM is an advanced debug mode. If you want to entry the EM, please entry the Developer options at settings!"... I didn't understand what to do and where is this option to enable.
settings>about device> tap build number until it states you're now a developer>back to settings>developer options