CyanogenMod for Sony device

1. To get to the service menu type this code in your dialer:
This way you can check if you can unlock your bootloader, it is 50/50 chance, it depends on the production batch.
If a bootloader is allowed to be unlocked you can install custom ROM, if not you will not be able to proceed any step further
2. find the right device on CM website
3. download the right build image (stable or nightly) and corresponding recovery image
4. download Open Google Apps from here
As you can see I would go for NANO build which is below 100MB in size
5. unlock bootloader:
6. PLEASE NOTE: you will need ADB and FASTBOOT applications and correct Sony drivers to be able to flash recovery image once the bootloader is unlocked
PLEASE NOTE that ADB and FASTBOOT uses different drivers to access the device
device is accessible using ADB when it is in normal mode
adb devices
device is accessible using FASTBOOT only from recovery mode
fastboot devices
fastboot flash boot boot.img
fastboot reboot

7. follow the instructions from an email they are going to send you
adb reboot bootloader - this is effective way to get to recovery mode for fastboot
fastboot -i 0x0xxx oem unlock 0xDxxxxxxxxxxxxx

8. flash custom ROM
adb sideload (from this moment you will not be able to access service menu anymore as it is not included in custom ROM)
9. install Google Apps
adb sideload
10. go trough initial device setup, sign up to Google Play
11. enable Root access within Developers option -> Root access for Apps and ADB
12. install TWRP ROM manager
13. flash TWRP recovery image
You definitely want to read this: as you will be presented with a question that your have to check prior flashing recovery image, you risk bricking the device so double check.
14. once custom TWRP image is flashed you can boot to it and perform a first backup