[Xperia Z1 Android Development] RHBH:
Ok, some things you need understand: Sony devices doesn't have a dedicated recovery partition. Rooting Xperia devices won't void your warranty if you do it by the right way (at least with devices from 2012 or later, I don't have experience with Sony devices before 2012). A device with unlocked bootloader doesn't have warranty.

One of the things that I recommend you to do is to Backup your trim area partition (mostly referred at the Xperia forums by "TA"), this contains sensitive and unique data for your device, including (but not only) your bootloader status (locked/unlocked) and your DRM keys (which make Sony proprietary things to work, like X-Reality for the display and BIONZ image processing for your camera).

So with this backup if you decide unlock your bootloader, later you can relock by restoring your TA, so your bootloader will return the the same state that it was when you did the backup, the same applies to your DRM keys (wiped or not), also Sony won't be able to check if you unlocked your bootloader, so you basically have your warranty back!

A locked bootloader will always check for Sony signature on the kernel, so modified/custom kernels will not boot on a device with a locked bootloader. Custom kernels needs an unlocked bootloader, this means, no CM or any other "pure rom" without unlocking the bootloader.

Some custom ROMs works on locked bootloader, but they are based on the stock ROM and works with the stock kernel.

You can have recovery by two ways: Installing a recovery through a script if your device is rooted or installing a custom kernel which have a recovery included.

To root your device you have two ways: Using an exploit that will write su binaries on your device and install a super user manager application (like SuperSU) on your device. Or unlocking the bootloader, flashing a kernel with recovery then flashing a SuperSU update.zip.

Since Android 4.3, Sony have a kernel built-in protection service named "RIC" this bad guy protects the system partition for being mounted as rw (read-write, the default is read-only), so even if our devices are rooted we can't write to the system partition. This made almost impossible to root our devices using an exploit to write su into the system (at least no one revealed one). There are two ways to disable the RIC service, the first is running a command from terminal (some custom kernels will do this for you), but you'll need a unlocked bootloader device; the other way is to use XZDualRecovery, made by [MENTION=4904057][NUT][/MENTION], this work on locked bootloader :D

What we do to get root and recovery on our devices is, downgrade to the latest directly rootable ROM (14.1.G.1.534 / Android 4.2.2), root, install recovery, then we update using the mutilated firmwares made by [MENTION=4904057][NUT][/MENTION], they're mutilated in two files, one zip (recovery flashable) and one FTF.

FTF is a firmware bundle (only signed files can be bundled in a FTF, signed = sony official files), you can flash FTFs using Flashtool (http://www.flashtool.net).

Some topics that I recommend you to read:

[Xperia Z1][INFO][REF] All the info you need before you begin

Root, Backup TA, Unlock bootloader and more! The ultimate Xperia Z1 guide

[FTF] C6902 & C6903 & C6906 & C6943 FTF Mega Collection

I recommend you to look if there is a FTF for your country/carrier, if you cannot find one, you can create one. So you'll be able to go back to your carrier customized firmware by flashing your own FTF... but if you don't mind on losing it this is not necessary.

Basically what I recommend you to do is:

Downgrade to 14.1.G.1.534 (http://xdaforums.com/showpost.php?p=51222121&postcount=2).

Install XZDualRecovery (http://xdaforums.com/showthread.php?t=2261606) [you don't need root if you're on 14.1.G.1.534, because the installer uses an exploit to write the recovery files on the system].

Then follow one of these tutorials (depends on the firmware you want):

[STOCK][C69XX][4.3] Update to 14.2.A.0.290 [Root & XZDR][LB/UB][16/1/2014]

[STOCK][C69XX][4.3] Update to 14.2.A.1.136 [Root & XZDR][LB/UB][DE-/ODEX]

[STOCK][C69XX][4.4] Update to 14.3.A.0.681 [Root & XZDR][UPDATED]

Note: If you're on Android 4.2.2, before flashing the C69XX_14.X.X.X.X.flashable.zip on TWRP, be sure to wipe the following partitions using TWRP:

Dalvik-Cache

System

Cache

Data

After this, I recommend you to periodicaly check for SuperSU updates and flash them on recovery, the same apply for XZDualRecovery updates.