Disclaimer: Continue at your own risk! We are not responsible for anything that happens to your phone.Pre-requisites:
- Your phone needs to have an Unlocked Bootloader.
- To unlock your phone’s bootloader visit: http://unlockbootloader.sonymobile.com
- Installing a custom ROM will wipe all the data like SMS,Contacts,Music,Videos,Apps present in your phone.
- For backing up SMS,call logs,Gmail,Google calender use: “SMS Backup +“
- Visit http://unlockbootloader.sonymobile.com and follow the instructions to unlock the bootloader of your phone.
- After successful unlocking the bootloader, Then I would assume that fast-boot is already setup on your computer.
- Download the Sony Xperia SP extended stock bootloader from Here
- Extract the above file and place the boot.img inside the fastboot folder on your PC.
- Now power off your phone.
- Enter fastboot mode by connecting the phone via a USB cable to your PC while pressing the Volume up button.
- Open Command Prompt(open run and type cmd) and navigate to the fastboot folder.
- Now type fastboot flash boot boot.img.
- This will flash the kernel on your device.
- Congratulations you have finally rooted your Sony Xperia SP.
source: xda