If you have locked bootloaders, flashing one of these will probably brick your device - with the exception of Nexus devices, which will usually automatically "OEM unlock" and wipe your data!
WARNING!
The rooting phone will erase all of your data.
All described operations you are doing at your own risk.