Root Sony Z3 compact with Lolipop (Android 5.1)

Submitted by Falken on

This keeps all your data and most settings intact, so you can use your phone as you do it (though it will spend a lot of time 'optimizing apps') or stop and go out :-)
You don't need to unlock the boot loader, so the camera quality stays awesome, and you get all the bundled apps, along with the Google ones.

Use the built in update app to go from 4.4 to 5.

Then use the settings, about, update menu to update to 5.1 latest.

Install Kingroot (I used 4.8) and let it root your phone.

Download the latest pre-rooted image (D5803_flashable_signed_23.4.A.1.264_IT_SU_2.49_XZDR_2.8.23 - region doesn't matter as far as I can tell).
Copy it to your phone's internal drive.…

Download XZDualRecovery (Z3C-lockeddualrecovery2.8.26-RELEASE.combined).
Unpack it and run it, selecting the SuperUser option (not SuperSU)

Boot to the new recovery (hold volume down at boot till it vibrates) and flash the pre-rooted image.

Boot to the now rooted Android 5.1

Remove Kingroot.

If the pre-rooted image doesn't have SuperSU, download it and flash it from recovery.

Done !

You can now install a working file manager (like Fx), the Xposed framework (xposed-v80-sdk22-arm) for tweaking stuff (like fixing the navigation bar colours) or any other tools you need.

Enjoy owning your device, rather than Sony.