[Sony Xperia Z Ultra] najoor:
** DISCLAIMER: I AM NOT A DEVELOPER. I DO THIS AS A HOBBY AND SHARE MY FINDINGS IN CASE SOMEONE ELSE FINDS THEM USEFUL. **

** THIS WORKED ON MY DEVICE BUT IT MAY NOT WORK ON YOURS. APPLY AT YOUR OWN RISK **​

This post shows you how to upgrade your system to lollipop 5.1.1 and optionally have root privileges. This is tested on C6833 model. For other models see the troubleshooting section near the end of the post.

Requirements:

Flashtool 0.9.18.6. or 0.9.19.6 or higher Important: Do not use Flashtool 0.9.19.0.

If you want to root the phone: Rooted XZU on Android version 5.0.2 or Kitkat with custom recovery installed.

This works on locked or unlocked bootloaders and any customization.

Download link for upgrade only:

C6833_14.6.A.0.368_1275-8026_R2D.ftf (unmodified Customized DE):

https://mega.nz/#!khF1nILD!C5D70e-BjCKVBCuOurjFOLcIMZDcldYVeIDnFiR-PGM

Download link for upgrade and root:

5.1.1-system.zip:

https://mega.nz/#!YoFgCSjA!Zh8t_4jeXcAEWhOYePA40uQLI7vw4-CnxohjBdMbpz0

C6833_14.6.A.0.368_No_System.ftf

https://mega.nz/#!l4dllSTT!R393EG4W3CwOZp1OLOzfUzpHF0IlvsmfW04BrGOggXc

Instructions for upgrading without root:

1- Back up your internal SDCARD and your apps.

2- Download C6833_14.6.A.0.368_1275-8026_R2D.ftf

3- Open Flashtool and click on the flash icon. Choose flash mode.

4- Navigate to where you saved C6833_14.6.A.0.368_1275-8026_R2D.ftf and flash this ftf with your phone in flash mode. I recommend wiping apps and cache and data (Note that wiping data will erase your internal SDcard too). To put your phone in flash mode, hold the volume down button when it is off and connect with the USB cable to the PC.

5- Reboot.

Instructions for upgrading with root:

0- If your existing system is rooted using Kingroot read the troubleshooting section below before continuing.

1- Back up your internal SDCARD and your apps.

2- Download C6833_14.6.A.0.368_No_System.ftf and 5.1.1_system.zip.

3- Copy 5.1.1-system.zip to your phone's internal SDcard.

4- Reboot to recovery and install 5.1.1-system.zip.

5- If you are coming from Kitkat just Turn the phone off. If you are coming from 5.0.2, reboot the phone and let it work through the boot animation which will take a while. Then it will show force closing messages and possibly reboots itself. At this point turn it off by holding down the power and volume-up keys for a few seconds. The phone will vibrate 3 times and turns off.

6- Open Flashtool and click on the flash icon. Choose flash mode.

7- Navigate to where you saved C6833_14.6.A.0.368_No_System.ftf and flash this ftf with your phone in flash mode. I recommend wiping apps and cache and data (Note that wiping data will erase your internal SDcard too). To put your phone in flash mode, hold the volume down button when it is off and connect with the USB cable to the PC.

8- Reboot.

Troubleshooting, etc.

This procedure works only if you follow every step carefully. When you are done you can easily test your root status in a terminal emulator or via adb. Please see the attached image.

If you have used Kingroot to root your existing system flashing this ROM may not work and it may leave your system with a partially updated file system that may be broken. The reason is that Kingroot (which in my opinion is malware) makes some of your system files immutable which means they cannot be removed during a software upgrade. To proceed, you should either find a way to replace this horrendous piece of code with SuperSU or downgrade to Kitkat and root with XZDualRecovery before trying this guide. Read the second part of http://xdaforums.com/showpost.php?p=62936808&postcount=22.

If during the procedure for root the flashing of the ftf in step 7 fails, repeat step 7 with C6833_14.6.A.0.368_1275-8026_R2D.ftf or any other 14.6.A.0.368 ftf but exclude the system partition in the flashtool dialog window. If you don't exclude the system partition you will not get root.

If you have root after the procedure but something else doesn't work, try a factory reset.

Note that flashtool 0.9.19.0 was specifically released to support the new sin format on new devices and some of its features don't work with older devices. So to avoid taking any chances I used version 18.

I don't know if this works for C6802 or C6806. Some users reported success on 6806, like this one and this. For that model you follow this guide and use the zip file posted here. The only difference is that instead of flashing the ftf posted here in the next step, use the stock 14.6.A.0.368 ftf for your phone and exclude system.