How to re lock bootloader on samsung galaxy s5? I have Unlocked Rooted Samsung Galaxy S5 recently it has been giving me a lot of issues and I want to send it to Samsung for repair meant. I understand that once you root your device you loose the warranty, but recently I was doing research and I found out if you re lock your bootloader and unroot your device you can get your warranty back, so can some one tell me how to do it ? and if you can tell me if there is a way to find out even if your bootloader is locked or unlocked ?

Thank you
First off, you don't get your warranty back, you hide that you unlocked and rooted in the first place (so you never "actually" lost warranty) . I don't know Samsung devices all that well, have you tried booting into fastboot and doing "fastboot oem lock"? If your device doesn't have fastboot obviously this won't work. Usually carriers and the phone companies can find out bootloader status by booting into bootloader with" adb reboot bootloader" or some key combination. 

Tip: if you are using SuperSU as your superuser app, there will be an unroot option in it. Good luck!