Currently, there are 2 kinds of Xperia Z2 lock not unlocked the bootloader. And also a bit different from FW version you are using. Currently, most of the Z2 is on genuine FW 69. See FW by the setting / about phone show the last line is 17.1.A.2.69 / 55. Before we start please make a backup copy of your important data.
Root Xperia Z2 Unlock Bootloader:-
First Install drivers from here.
Download Z2-Community_Rootkiet-v01.zip And unzip it on your computer desktop.
On Z2 in Setting/about phone/ the last line – 17.1.A.2.69 – clicked 7 times.
Come back to setting and click on developers option.
Tick on USB Debugging.
Connect the cable to the Z2.
Go to the directory Z2-Community_RootKit-V01 run the runme.bat file. You’ll see “Installing exploit app” notification as shown below.
Progress will be as shown below.
On the Z2 screen will display the following screen -> Select Edit Service info
Go back to the computer and press any button on the computer to continue
If successful, you will see the message “Removing exploit app” as shown below
13. Unplug the cable and restart Z2 and check that there is successful Superuser app.