To help you with installing root on the Xperia phones, we have a detailed guide below. However, note that to install TWRP, you need to unlock the bootloader. The recovery files are compatible only with Xperia Z codenamed Yuga and the ZL codenamed Odin. Applying these on any incompatible variants could damage the devices. Also, create a backup of all data before your jump directly to the rooting process.
Download TWRP recovery:
How to install TWRP recovery and root Xperia Z and ZL
- For this go to Settings>> About phone then tap on build number seven time until a message pop-up appears saying You are now a developer.
- Go to Settings then choose Developer Options, then scroll down to USB Debugging and enable the option.
- To open command prompt, click on the empty space inside the folder. Hold the shift key and right click on the empty space.
- Choose Open command window here from the drop down menu.
- Switch off the phone
- Press Volume Up button, connect the phone to the PC using USB cable while holding the Volume Up button
- The Xperia Z/ZL should be in Flash Mode and its LED light will turn blue
- fastboot devices
- fastboot flash boot boot.img
- For this switch off the phone
- Press Power and Volume Down buttons together until you get a vibration alert. Now release tthe Power button while keep holding the Volume Down button
- A screen will appear with green Android is the middle with an exclamation mark
- Now release the Volume Down button and your phone will enter into recovery mode