Phone glitching, Custom OS warning
My phone randomly turned off. I held the power button, the home button, both of them at the same time, I tried the volume up button with the power button, I basically tried every combination of buttons I could, and it was completely blank. I plugged it in and got a battery charging sign, which alternated with the Samsung logo. I tried volume up + home + power button, and it started alternating between the Samsung logo screen and an "installing systems update" screen. I held volume down + home + power, and got a warning screen about a "custom OS" and it said to press the volume down to cancel it or the volume up to continue with it, but whenever I press one of the two it either immediately goes away or does nothing. It is currently stuck flashing between the Samsung screen and the "installing systems update" screen, both of them flash for about one second and then go away for about two (like the logo will flash for a second, then go black for two, then show the systems update screen, then go black, and it continues). It's been like this for about 2 hours. How do I fix it??