I had the issue where safe mode was on and anytime I tried to take it off it would take me back to the warning custom os page. HIGHLY ANNOYING! I turned it off holding the power button, volume up and home key (it's a Samsung Tab A) then once it booted back up I held the down button until the home screen came on (I held the down voume button once I put in my password if u don't have a password just hold the down volume button straight away). It worked returned all the apps and the safe mode logo was gone. HALLELUJAH!!!