Xperia Z was released by Sony back in January 2013 and has got Android 4.4.4 KitKat update is planned to receive the latest Android 5.0 Lollipop firmware update. So if you are the owner of this device and can’t wait till you get Android 5.0 Lollipop update on your device then you can install the AOSP Custom ROM on your device to update it to Android 5.0 Lollipop firmware. If you are ready to update Xperia Z to Android 5.0 Lollipop firmware via AOSP ROM, then follow the steps listed below in this guide and update your Xperia Z to Android 5.0 Lollipop.
Before we proceed let me warn you that this ROM is supported by Xperia Z C6602 and C6603 models and it is not tested with other models, if you take the risk of installing this on other models and it succeed then do let us know in the comment section.
Check here for pre-requisities:
We should not be held liable or responsible in any manner for any damage occurred to Xperia Z Android Smartphone. So understand the risk involved in installing this ROM and proceed at your own risk.
AOSP ROM Package
How to update Xperia Z to Android 5.0 Lollipop using AOSP ROM:
1. Download the AOSP ROM Package from the above link.
2. Extract it to the Fastboot folder.
3. Power off Xperia Z.
4. Enter into Fastboot Mode by connecting the device to PC by holding the Volume Up button.
5. Open the Fastboot folder and press and hold the shift key and right click anywhere inside the Fastboot folder at the empty space and from the list choose open command window here.
6. Now a Command Prompt will open.
7. Now in CMD type the following commands and hit enter after each command:
fastboot flash boot boot.img
fastboot flash userdata userdata.img
fastboot flash system system.img
8. Now your device will reboot into normal mode.