Although Sony embraces the Android community and offers a tool to unlock the bootloader on Xperia devices, which you can then gain root, doing so disables certain features.
If you want root, but don’t want to lose features such as the X-Reality engine and TrackID app, please keep reading.
DoomLoRD, with the help of xsacha, GranPC, norti, RyokoN, [NUT] and jcase, just released v01 of Community Rootkit, an ASEC exploit for the Xperia Z2. Community Rootkit gives full root without unlocking the bootloader, but it works on devices with either a locked or unlocked bootloader.
The script is currently Windows-only, with Linux and Mac support is coming soon in v02, and DoomLoRD said it was tested on Xperia Z2 firmware 17.1.A.2.55/.69. The root exploit doesn’t work on the latest .402 firmware, so you would need to downgrade if you’re not on .55 or .69 firmware.
Community Rootkit will root your Z2 as well as install Busybox and SU files. Before running it, making sure you have ADB drivers installed for your device and enable “USB DEBUGGING” and “UNKOWN SOURCES” then it’s as simple as extracting the file, executing “RUNME.bat,” reading and following instructions on the screen and rebooting after the script has finished executing.
For full instruction to freei your Z2 and to download the script, follow the source link below.
Once updated to v02, more devices should be supported as well. DoomLoRD said it was tested on the Xperia Tablet Z2 and it works flawlessly.
VIA: Cult of Android