Start with installing the TWRP recovery first. And then using the TWRP, you can root your Xperia Z/ZL back pretty easily. Thanks goes to shoey63, for coming up with the modified boot images to get TWRP back on Android 5.1.1.
It must be noted that the TWRP is currently available only for unlocked devices. See step 1 below for help on this.
- TWRP Recovery:
- SuperSU Root package — Link | File: UPDATE-SuperSU-v2.46.zip
- SONY XPERIA Z, codename Yuga
- SONY XPERIA ZL, codename Odin
- Don’t try this one any other device!
Important: Check your device’s model no. on free Android app called Droid Info. If you see codename mentioned above in the app, then use this recovery, otherwise not. BTW, you can check model no. device’s packaging box too.
Warning: Warranty may be void of your device if you follow the procedures given on this page. You only are responsible for your device. We won’t be liable if any damage occurs to your device and/or its components.
Backup important files stored on your device before proceeding with the steps below, so that in case something goes wrong you’ll have backup of all your important files.
Step 1. Make sure you have unlocked bootloader of your Xperia Z/ZL. If your device is bootloader locked, then you need to go to Sony’s site and unlock bootloader. See our guide for additional help, the procedure remains same.
Step 2. Install ADB drivers.
Step 3. Install Sony driver.
Step 4. On your Xperia Z/ZL, enable USB debugging. For this:
- Go to Settings > About phone, and then tap ‘Build number’ 7 times or until you see the ‘you’re not a developer’ message pop up.
- Go back to Settings, then choose ‘Developer options’. Find the ‘USB debugging’ option and use its toggle button to enable it. Accept warning by tapping on OK button.
Step 5. Connect your Xperia Z/ZL to PC now. You will get a pop-up as shown below on your phone when you connect for the first time after enabling USB debugging. Select ‘Always allow from this computer’ checkbox and then tap on OK button.
Step 6. Download the Xperia Z/ZL TWRP recovery from above. And also the SuperSU file that will be used to Root the device.
If you wish to root your device too, then transfer the SuperSU file (UPDATE-SuperSU-v2.46.zip) to phone.
Step 8. Now, open command window in the folder where you have the TWRP recovery file, boot.img. For this:
- Open that folder and then left click on empty white space in the folder.
- Now, while holding shift key, right click on empty white space to get a pop-up as shown below.
- Now choose Open command window here option from that.
You will see a command window open up, with location directed to folder where you have the twrp recovery file.
Step 9. Boot your Xperia Z/ZL into Fastboot mode:
- Switch off your Xperia Z1.
- Press and hold the Volume Up button on device and while holding it, connect it to your PC using a USB Cable.
└ Before plugging in the USB cable on your Xperia Z1 make sure that the other end of USB cable is already connected to the PC.
- Your Xperia Z1 should be in Flash Mode now and the device’s LED light should turn into blue.
Step 10. Test whether fastboot is working alright. For this, run the command given below. (You can also copy paste the command and then use enter key to run it.)
→ Upon running command below, you should get a serial no. with fastboot written after it. If you don’t get fastboot written on cmd window, then it means you need to reinstall adb and fastboot drivers, or change restart PC, or use original USB cable.
Step 11. Flash Xperia Z/ZL TWRP recovery now. Use the following command for that.
fastboot flash boot boot.img
Step 12. TWRP recovery will now be installed on your Xperia Z/ZL. When done, reboot into recovery mode.
- Turn your device off.
- Now, press both Power and Volume down button together until your you feel vibration from the device. Once you do, release the Power button quickly while keep holding the Volume down button.
- If you did the above step correctly, then you will see the screen with dead green Android in the middle, with an exclamation mark.
- Now, when you see that screen, release the Volume down button and you will enter recovery mode. You will see TWRP recovery.
Step 13. [Optional] You will see TWRP recovery, v220.127.116.11. Now, you must take a full backup of your phone, including system partition. In TWRP, tap on Backup, and then select all partitions. Then do the swipe action at bottom to start the backup process.
Step 14. To Root, tap on Install button, and then browse and select the SuperSU file (UPDATE-SuperSU-v2.46.zip). Then on next screen, do the Swipe action at bottom to flash the root package.
Step 15. Tap on Reboot System to restart the device. That’s it.
And let us know if you need any help regarding installation of TWRP recovery on your Xperia Z/ZL. Use the comments section below.