How to Root the Sony Xperia XZ1 and Install Magisk
Some smartphones get root methods relatively quickly, while others are left hanging due to a lack of developer interest, technical difficulties, or both. The Sony Xperia XZ1 is a prime example: It was released in August of this year, but it’s taken a while for someone to figure out how to root it. XDA Senior Member N1ghtr08d says he spent a few days coming up with a process and wrote a guide to show others how to do it. His method, which uses Magisk, requires that you install a modified version of TWRP and that you use a custom kernel, but the rest is relatively straightforward. As long as you’re comfortable using the Android Debug Bridge to format data and flash images, you’re ready to get started.
Note, though, that if you choose to root your Xperia XZ1 using this method, you’ll lose your DRM keys. That means you won’t be able to use first-party features like Track ID and X-Reality.
Check out this guide in our Xperia XZ1 forum