[Xperia Z3 Compact General] bilboa1:
Friend needed the complete how-to root, recovery, backup drm keys, etc from scratch as following threads can be daunting.. here's a copy of what i sent him (tested, works) in case this helps anyone. All 44 steps of it ;)

0) Ensure you backed up everything you need (files/apps/pictures/etc) first, these will be lost!

-- FW DOWNGRADE AND INSTALL WITH FLASHTOOL --

1) Downgrade fw to 23.0.A.2.93 (Device D5803) or anything prior to 23.0.1.A.5.77 (december fw)

Global: https://mega.co.nz/#!1RUA0IbT!HhWALw7wTJI7sNg9z6aXq-ilZCZgLtjpRzbrjYSH40M (or see http://xdaforums.com/z3-compact/general/list-stock-firmwares-d5803-d5833-t2906706 for more links)

2) Get and install Flashtool at http://www.flashtool.net/index.php

3) Move the fw into the C:/Flashtool/firmwares directory

4) Open Flashtool, click on the lightning symbol ("flash device"), select "Flashmode" and click on "OK"

5) Just select the name of the fw you downloaded and click on "Flash"

6) Wait for a window to pop up (it may take a few minutes, be patient)

7) Now everything is ready: turn off your phone

8) Push the volume DOWN button, connect the USB cable to your PC while still pushing the volume DOWN button

9) Once the flashing process has started, release the volume button

10) Do not disconnect the USB cable, wait until flash completes (flashtool will indicate when you can unplug).

-- ROOTING W/ EXPLOIT --

11) Enable USB debugging on the phone (Settings => About phone => Click 7 times on Android Build to unlock developer options)

12) Allow mock locations (Settings => Developer Settings)

13) Ensure you have adb drivers installed (http://support.sonymobile.com/gb/tools/pc-companion/ don't use it to update ;)

14) Download rooting tool (http://xdaforums.com/devdb/project/dl/?id=10766&task=get) or latest from http://xdaforums.com/crossdevice-dev/sony/giefroot-rooting-tool-cve-2014-4322-t3011598

15) Unzip the rooting tool ;)

16) Connect phone to your computer

17) Put phone in airplane mode

18) Run install.bat from the rooting tool (allow USB debugging when asked on the phone every time, also allow root prompt) and follow instructions from the tool

19) You should be rooted now, if you get an error "Device not rooted" trying running the tool once more

-- Backup DRM keys/TA Partition --

20) Get backup ta tool from https://github.com/DevShaft/Backup-TA/releases

21) unzip it!

22) Ensure phone is still connected (or reconnect it)

23) Run Backup-TA.bat

24) Read the information and follow the instructions given by the tool.

-- Install latest firwmare with root, DRM keys, recovery --

25) get PRFC from http://xdaforums.com/crossdevice-dev/sony/tool-prfcreator-easily-create-pre-t2859904

26) Get latest fw (https://mega.co.nz/#!AUEg1ayC!UsKs6yR6_ZaYqrsddexZHj_Y17EkXg8zMdkBCFi-X9Q)

27) Get latest SuperSU zip http://download.chainfire.eu/supersu

28) Get DualRecovery zip (the non-installer one) http://nut.xperia-files.com/?dlid=W...vdmVyeTIuOC4wLVJFTEVBU0UuZmxhc2hhYmxlLnppcA==

29) Start PRFC and add the 3 zip (FTF file is the fw, SuperSU and Recovery)

30) Click "create" - this will take a while

31) Copy resulting "pre-rooted" fw to /sdcard0 on your phone (it means copy flashable.zip from the PRFC directory to the "internal storage" directory of the phone)

32) Get Dual Recovery http://nut.xperia-files.com/downloa...vdmVyeTIuOC4wLVJFTEVBU0UuaW5zdGFsbGVyLnppcA== (or from http://nut.xperia-files.com/ you want

Z3C-lockeddualrecoveryX.Y.Z-RELEASE.installer.zip notice how thats 'installer' this time, not the same file as in 28!)

33) unzip it

34) Unfortunately the script is a bit buggy here, so first go in the "files" directory then go to File menu of the windows explorer and select "open command prompt..."

35) in the command prompt type "adb shell" then "su" (allow root on the phone if needed) then "mount -orw /system". That's it, close the prompt window.

36) start install.bat and follow instructions (hit 1 ;) (allow adb/root on the phone as needed)

37) You should be in recovery automatically now. (if not, reboot and when the LED change colors push volume UP repeatedly)

38) Flash the pre-rooted fw (flashable.zip) from the recovery (touch "install") on the phone, then power off the phone (DO NOT REBOOT)

39) To power off, go in the reboot menu (yeah it feels backwards) then you can hit "shutdown". wait for it to shutdown.

40) unplug USB

41) Open Flashtool and select the non-pre-rooted fw, but DESELECT system: in "EXCLUDE" make sure you check the checkbox next to "SYSTEM"

42) press volume DOWN and plug USB cable while keeping volume DOWN pressed, when flashing starts, stop pressing the volume button

43) After flash is done and when flashtool tells you to, remove USB cable and start the phone

-- Optional, if you need to restore DRM keys (for ex. if you unlocked the bootloader - note that this WILL relock the bootloader)

44) plug USB back in ;)

45) re-enable usb debugging on the phone (Settings => About phone => Click 7 times on Android Build to unlock developer options)

44) Start backup TA again but this time hit restore

45) Congrats and enjoy, you made it to the end! you now have latest + recovery + root and backups of your DRM keys! (and of course all DRM functions enabled)

People who did the hard work/references thanks to them:
[MENTION=4708091]istux[/MENTION] (fw list, flashtool how to http://xdaforums.com/z3-compact/general/list-stock-firmwares-d5803-d5833-t2906706)
[MENTION=2303873]xzx[/MENTION]0O0 (root exploit: http://xdaforums.com/crossdevice-dev/sony/giefroot-rooting-tool-cve-2014-4322-t3011598)
[MENTION=5261329]DevShaft[/MENTION] (backup ta http://xdaforums.com/showthread.php?t=2292598)
[MENTION=3989065]serajr[/MENTION] (install .77 fw http://xdaforums.com/showpost.php?p=58395100&postcount=71)