[Xperia Z Q&A, Help & Troubleshooting] vo4LG:
My Q&A: not definitive, but hopefully this will ease question duplication

I've decided to update this post to be an informal Q&A-link-list in the desperate hope that people will come across it before asking the same questions again and again. Look here to see if your question has already been answered. If you think something needs to be added to this post, then post it in thread.

INFO CURRENT AS OF ~1AM UTC 13 Nov 2014.

There are two versions of the Xperia Z Lollipop rom: one by thomas, and one by pabx. Installation instructions differ in places between the two, as do the prerequisites. I will list note when they are different.

How do I install?

Prerequisites:

An unlocked bootloader. If not unlocked, see 'Bootloader unlocking' below

The fastboot and adb command line tools. For more on them, see 'Adb and Fastboot' below

Additional prerequisites for thomas's version if you want gapps or SuperSU:

A kernel including a recovery: I suggest HodorKernel

The SuperSU update package

A Gapps package (such as these ones suggested a while back by @_infected). If you find these gapps don't work for you, but find others that do, then post in the thread so this can be updated.

If you have the prerequisites, then you can continue. Note that installation will wipe your phone completely, including the internal SD.

PABX's version: downloads and installation instructions can be found here.

Thomas's version: see this post.

Regarding Root

Pabx's build doesn't support root. If you need root, use Thomas's build.

Regarding recovery

Thomas's build doesn't include a recovery. Pabx's includes CWM recovery.

If you need a recovery on thomas's, you'll need to temporarily flash a boot image which includes a recovery. That would be the HodorKernel I suggested earlier.

To temporarily add a recovery to Thomas's build, take the following steps:

Enter fastboot by unplugging the USB, powering the device off, and holding the up volume button when plugging in a USB cable connected to your PC. The light on your phone will turn red, then blue. When it is blue, your phone is in fastboot mode.

On your PC, extract the HodorKernel zip file, and locate the boot.img

Flash the boot.img using the following command: fastboot flash boot boot.img

Unplug the USB cable

Press the power button

When the indicator light on your phone turns on, press the volume-down button repeatedly. You will eventually enter recovery. For some reason, you may need to touch the screen (rather than the power button) to actually turn the screen on once the recovery has loaded

Do what you need to do with the recovery (e.g. flash, etc)

Power off the device (I believe the option is in the 'reboot' menu)

Go back into fastboot (i.e. hold up volume, plug in, etc)

Flash the original boot.img from thomas's rom

Unplug USB

Boot

Bootloader unlocking

Unlocking your bootloader allows you to install unofficial ROMs on your Xperia Z. See here for how to unlock. Read the warnings.

this adb tutorial and this guide to fastboot. You can download these tools for Mac here and Windows here. If you're having problems with Windows, particularly Windows 8, look here.

If the links don't work, go find links that do and post them here. I can then update these links.

This isn't the fastboot or adb Q&A thread. If you don't understand how to use fastboot and adb, this isn't the place to ask. XDA is scattered with more guides than I can point a pointy thing at for fastboot and adb.

Post-original post:

EDIT: Don't use the GApps I've mentioned. They kind of work, but are pretty flakey for the XZ.

EDIT 2: PABX has posted a new build, but more importantly also some GAPPS. (http://www.blinkenlights.ch/ccms/android/yuga-l.html)

However, the GAPPS are a .tgz which means (I think) they can't be flashed using recovery. Thus, you'll more or less need to follow the procedure in this post.

NOTE: you only need to flash them using the procedure below if you are not using PABX's build. If you are, then you just need to follow the installation instructions on his page.

An alternative set of gapps linked by _infected is https://www.androidfilehost.com/?w=files&flid=20902

(_infected's post is http://xdaforums.com/showpost.php?p=56623436&postcount=314)

Original post:

I've used the GApps from here: http://xdaforums.com/google-nexus-5/orig-development/illusionrom-lollipop-lrx21m-t2929192

Because there is no recovery (that I know of) you have to manually copy them on using ADB, but once they are on you can create an account, access the play store, and thus install the other Google apps.

(I have barely tested them, though)

To install thees Gapps, I did the following (in brackets is description, don't enter it. Number is sequence of events, don't enter it.

1. adb shell (open a shell)

2. su (become root user)

3. mount -o rw,remount /system (make the /system file system writeable)

4. mkdir /tmp/gapps (make a directory to put the gapps in temporarily without losing the file system privileges on them)

5. chmod 777 /tmp/gapps (make the /tmp/gapps folder writeable to all)

6. exit (leave su)

7. exit (leave adb shell)

8. Unzip the file downloaded from the link above

9. adb push /system /tmp/gapps (push the gapps /system folder to the temp directory we created)

10. adb shell (back to the shell on the phone)

11. su (root again)

12. chown -R root.root /tmp/gapps (change ownership of all the gapps file to root)

13. cp -r /tmp/gapps/* /system/. (copy the gapps files into the /system partition file system)

14. exit (leave su)

15. exit (leave adb shell)

16. adb reboot (reboot device)

17. ???

18. Profit!!!

I'm not certain all these steps are necessary, and I'm writing them from memory not as I do them but I am pretty sure they are correct.

---------- Post added at 05:52 AM ---------- Previous post was at 05:26 AM ----------

By the way, GPS seems to work fine. Getting a good lock (4m accuracy) outdoors.