This Rooting method can be done in way so that your warranty is not voided, no need to unlock the bootloader as well. Make sure you read and follow each step carefully. And as always i will not be responsible for any damage due to your low IQ...
Things You Require to Root Xperia U :
A Sony Xperia U Phone
Steps to follow to root Xperia U :
Step 1 : Ensure the following settings twice :
Settings > Security > Mark "Unknown sources"
Settings > Developer options > Mark USB debugging
Settings > Xperia > connectivity > USB connection mode > select MSC mode
Step 2 : Install the latest version of FlashTool from above download link.
Step 3 : Connect you Xperia U to PC
Step 4 : Start flashtool, press the root button, select superuser and press OK:
Step 5 : When prompted click the restore button on your phone, be sure you select the 'RootME' recovery!
Step 6 : Let the device reboot 3 times.
Step 7 : Check the log files as shown below :
Now you have successfully Root Sony Xperia U, and you can fully customize your android smartphone.