Xperia Z2 has impressive numbers in contrast to hardware specifications and a good update to the Xperia Z1,the predecessor,mainly the display which the Z1 compromised with.
Rooting the phone is easy which includes unlocking bootloader and flashing Doomlord's kernel ,asap,you will be able to flash custom Roms and Xposed modules.Credits go to XDA-member DooMLord and various contributors.
PRE-REQUISITES-
-Note your IMEI by dialing *#06# and copy it down somewhere and install the drivers package.
-Download fastboot package
here
-Download FlashTool driver Xperia pack from
here and install fastboot drivers and adb drivers
-Switch off your phone and connect to USB,now power up and hold power+volume up buttons .This will install fastboot drivers
-Once done disconnect and power on the Z2.
UNLOCKING BOOTLOADER-
~Official Way
-Go to
http://unlockbootloader.sonymobile.com/ and read .
-Click start unlocking bootloader
-
First, you should confirm that it is possible to unlock the boot loader of your phone by checking the service menu. In your phone, open the dialler and enter *#*#7378423#*#* to access the service menu.
In your phone, tap Service info > Configuration > Rooting Status. If Bootloader unlock allowed says Yes, then you can continue with the next step. If it says No, or if the status is missing, your device cannot be unlocked.
-After seeing Yes,scroll to bottom and select unlock bootloader.
-Accept all prompts.Enter your "IMEI" in request unlock page , name and e-mail
-Check e-mail and save the key.Extract the file and open fastboot folder ,hold shift and right click and select open command window here ;Turn on your phone with USB in fastboot mode as mentioned above
-Type fastboot.exe -i 0x0fce getvar version in cmd
-If value returns to 0.5 or w/e means phone is properly connected .Type
fastboot.exe -i 0x0fce oem unlock 0xKEY and replace KEY with which you received through e-mail.
-Now bootloader should be unlocked successfully
FLASHING CUSTOM RECOVERY-
-Download
this file on PC.This contains DooMLord's kernel and recovery
-Save boot.img to fastboot directory
-Open fastboot (as mentioned above step-5)and type fastboot flash boot boot.img and then type fastboot reboot
-Enter into recovery by tapping or pressing volume botton when SONY logo flashes
ROOTING--Reboot into recovery and flash SuperSU file-Reboot
-You need recovery for this
-Download this and copy onto your phone . This contains SuperSU flashable zip.
INSTALLING BUSYBOX-
-Go to Play Store and download busybox installer
-Install busybox in /system/xbin
-Reboot the device
Sources-XDA-Developers