Chosen Solution
i plug in my phone and my phone restarts continuesly
My exact problem, also. But, I found out it’s the earbuds, not the tablet. I have a samsung tablet A. I even tried them on my phone and got the same issue (constant restarting and freezing until I unplugged them). New 5$ earbuds, problem solved.
this is the problem with the headphones 50% times . bit try disabling ok Google detection on wired headphones . and try resetting your device, if that doesn’t work its a hardware problem fix it on Samsung warranty if u have or go to a shop ( try installing a genuine headphone jack for the original hardware) and try installing the latest version of android . a custom rom can also cause this problem but in my opinion the headphone is the problem try using a split headphone connection