[Xperia Z3 Compact General] systemallica:
Hello, a couple of days ago I wanted to upgrade to Marshmallow but I couldn't find a proper detailed guide to do it, so in this thread I'm gonna show you how to install latest Sony's Concept 3027(latest version), how to unlock the bootloader, how to install TWRP, how to root your phone, and how to install Xposed.

I made this coming from stock 5.1.1, but it should work for other ROMs and versions too (You must be rooted though).

During this process, you will wipe your phone and unlock your bootloader, so make backups of everything you need.

Let's begin:

0- Make sure your bootloader is locked, and can be unlocked. To check this, go to dialer app, press *#*#7378423#*#*, service info->configuration, under "Rooting status", "bootloader unlock allowed" should say yes. Notice that at the top of your screen says IMEI, note that number down, you will need it later.

1- First of all, download all the necessary files:

ftf file(ROM v.3606): https://cloud.mail.ru/public/48SH/AyETJ63bw

SuperSU 2.76: https://download.chainfire.eu/969/SuperSU/UPDATE-SuperSU-v2.76-20160630161323.zip

TWRP Recovery 3.0.2-0: https://dl.twrp.me/z3c/twrp-3.0.2-0-z3c.img.html

Xposed Material apk: http://xdaforums.com/devdb/project/dl/?id=19668&task=get

Xposed installer v86(sdk23-arm): http://dl-xda.xposed.info/framework/sdk23/arm/xposed-v86-sdk23-arm.zip

Flashtool: http://www.flashtool.net/downloads.php

Fastboot driver: dl-developer.sonymobile.com/drivers/downloadinf_v1.01.zip

TA backup tools: https://github.com/DevShaft/Backup-TA/releases

BACKUP TA PARTITION

Make sure to be rooted before proceeding. You won't be able to backup TA properly without root!

2- Unzip the TA backup tools downloaded in step 1.

3- Connect your phone to the computer. Run backup-ta.bat.

4- Follow the instructions.

INSTALL THE ROM

5- Now, install Flashtool. Once installed, go to "C:\Flashtool\drivers" and install flashmode and fastboot drivers(You will need to disable driver signature verification on windows 8/8.1/10).

6- Take the ftf file previously downloaded and move it to "C:\Users\username\.flashTool\firmwares

7- Open Flashtool, click on Flash device->Flashmode. The ftf should appear on the list. Check Wipe APPS_LOG and USERDATA. Click Flash and follow the instructions. If it asks to use a script, click no.

8- This process may take a while, be patient.

9- Boot your phone normally, you should be on Concept version 3606.

10- Go to Settings->About device-> Software update.

11-If there is an update available, take it. Your phone will reboot and install the update. Repeat this step until you don't have any more updates.

Okay, until now you have installed latest unmodified Sony's Concept ROM, if you don't need root or Xposed, that's it, you have finished!

UNLOCK THE BOOTLOADER

Warning: Unlocking your bootloader voids your warranty and makes you lose some stuff, as detailed here: http://xdaforums.com/z3-compact/general/loss-drm-keys-t2890936

So make sure to make the TA backup in order to recover those things when you relock your bootloader in the future, if you want.

12- To begin, you need your IMEI number, that you noted in step 0.

13- Go to this webpage: http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/

14- Select Xperia Z3 Compact, click Continue, enter your email address

15- Click the link they sent you via email. Enter your IMEI, click Submit.

16- At the bottom of the page there will be a code, similar to "fastboot -i 0x0fce oem unlock 0xA8873D989C26BBBB", copy it.

17- You need to install the android SDK now, if you don't have it installed, or don't know how, there are plenty of guides on the web.

18- Open it, make sure to install "Google USB Driver Packager".

19- Go to "C:\Program Files\Android\sdk\extras\google\usb_driver" and copy the Fastboot driver downloaded in step 1.

20- Turn off your phone. Press the volume up button, and while doing this, connect the phone to your computer. It should boot into fastboot mode.

21- In your PC, go to "C:\Program Files\Android\sdk\platform-tools". Hold shift, and right click inside the folder. Click "Open command window here".

22- Type "fastboot devices" in the command window. See if your device shows up. If not, you did something wrong with your drivers, make sure that your SDK installation is correct.

23- Now copy the line you copied in step 13. Hit enter.

24- Your bootloader is now unlocked. Reboot your phone, it will wipe all your data, so you have a fresh install of the system.

INSTALL RECOVERY

25- Enter again into fastboot mode. That means, turn off your phone, hold volume up, and connect it to your PC.

26- Copy the TWRP Recovery downloaded in step 1 to "C:\Program Files\Android\sdk\platform-tools".

27- Rename it to "twrp.img".

28- Open a command window.

29- Type "fastboot flash recovery twrp.img".

30- That's it, now you have TWRP installed.

ROOT PHONE

31- Copy "SuperSU 2.76" downloaded in step 1 to your phone.

32- Enter Recovery mode.(Easiest way is: enter fastboot, use volume keys until "recovery mode" is selected and press the power button to enter it.)

33- Click Install, search for "SuperSU 2.76-2", swipe to confirm. Reboot your phone.

34- Done, you are now rooted!

INSTALL XPOSED

35- Copy "Xposed installer" and "Xposed apk" to your phone.

36- Enter Recovery mode.

37- Install "Xposed installer"

38- Reboot.

39- Install "Xposed apk.

40- You finished!

This is the end of the guide. Hope everything went fine for you. Feel free to post your doubts, if any! Cheers :D

Big thanks to:

-russel5 for the ftf file

-jozinek for his useful info

-Chainfire for SuperSU

-rovo89 for Xposed

-twrp team