Hello Everyone!

Since it’s been released, we have waited for a long time to root our Sony Xperia XZ1 phones… But finally, thanks to these three people N1ghtr08d, modpunk and janjan from XDA Developers, we can now 🙂


In this tutorial I will show you how to root your Sony XZ1 on Linux by combining the amazing tutorial compiled by N1ghtr08d and using Linux Terminal.



1) Unlock Your Developer Options

  • Settings > System > About Phone
  • Tap repeatedly on Build Number until you unlock Developer Settings

2) Unlock Your Bootloader

  • Settings > System > Developer Options
  • Turn on OEM Unlocking
  • Open your dialer and type *#*#7378423#*#* to access the service menu
  • Service Info > Configuration > Rooting Status (If it’s yes, you can root your device)

3) Drivers

  • No drivers required for Linux users.

4) Tools

  • Make a directory as WorkDir on your Desktop
  • Download Platform Tools and extract it to WorkDir

5) Getting Your OEM Password

  • Click on this link and then select your device
  • Open your dialer and type *#*#7378423#*#* to access the service menu
  • Service Info > Configuration > IMEI
  • Copy the IMEI Number and paste it on the required field and get your OEM Password.

6) Enable USB Debugging

  • Settings > System > Developer Options > USB Debugging
  • Turn on USB Debugging

7) Fastboot

  • Turn off your device
  • Connect it to your computer via a USB-cable
  • On your device, press the volume up button, if it connects you will see a blue light.
  • Start a terminal and log-in as root (sudo -i)
  • cd /home/yourusername/Desktop/WorkDir/platform-tools
  • run this command and check that you get no errors afterwards ./fastboot devices
  • run this command to unlock your Bootloader /.fastboot -i 0x0fce oem unlock 0x<insert your unlock code>
  • Verify that you get no errors.
  • Open your phone

8) Downloading Root Files and Preparing Your Work Field

  • modpunk’s port of TWRP
  • janjan’s Kernel and DRM Package
  • mkdir /home/yourusername/Desktop/WorkDir/TWRP /home/yourusername/Desktop/WorkDir/JanJan
  • Copy TWRP image into TWRP folder and extract janjan’s package into JanJan folder.
  • Connect your phone and copy the three zip files in janjan’s package into your phone

9) Rooting

  • Connect your phone to your computer
  • Start a Terminal and log-in as root (sudo -i)
  • cd /home/yourusername/Desktop/WorkDir/platform-tools
  • ./adb reboot bootloader
  • ./fastboot flash boot ../JanJan/JANJAN_XZ1_Kernel+DRM-patch+Magisk/1-boot.img
  • Once the boot image is flashed, unplug and boot up your phone and check your kernel version. Settings > System > About Phone > Kernel Version (It should be “4.4.78-Amjal-Safi-amjalsafi@amjalsafi #1“)
  • Once again boot into bootloader by running ./adb reboot bootloader
  • ./fastboot flash recovery ../TWRP/twrp-3.2.1-0-poplar-4-patchlevel-2018-02-05.img
  • Boot up your phone and then power off it.
  • Boot into TWRP by holding power button and volume down button at the same time and release them when you hear the first vibration.
  • Once you boot into TWRP if it asks you a password, it is the pin you’ve set for the phone or if you did not, it’s default_password.
  • In TWRP select Install and then install 2-Patching_drm_Su and 3-Magisk-v15.3
  • Reboot your phone and check if Magisk is installed or not. If it’s installed, don’t open it yet.
  • Turn off your phone and boot into TWRP again by holding power and volume down buttons at the same time.
  • Install 4-kernel_permissive and then reboot your phone.
  • Open Magisk App and check the modules section to be sure that the Magisk SELinux Permissive Script is active.

10) Enjoy

  • Enjoy your rooted phone!




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s