[Sony Xperia 1 Guides, News, & Discussion] bagusaryo:
Hi guys, I was doing my research about how to root Xperia 1. I have J9110 and running the latest firmware 55.1.A.8.1 with Android 10. I managed to root my device now. So, I decided to share it with you guys as clearer as possible for the guide. I'm rooting with Windows Laptop.

INFO: This guide can be applied to any series of Sony Xperia 1.

PLEASE NOTE: Rooting a device may void the warranty on the device. It may also make the device unstable or if not done properly, may completely brick the device. Some methods may install additional apps/software on your device. I do not take any responsibility for your device. Root at your own risk and only if you understand what you are doing!

Remember to always setup your phone to enable USB Debugging Option.

Open the Settings application on your phone.

Open About Phone.

Then tap the Build Number option 7 times to enable Developer Mode.

Now go back to the main Settings screen and you should see a new Developer Options menu you can access.

Go in there and enable the USB Debugging mode option.

Install ADB (move to the next guide)

You are partially done with the phone setup process. Next up, you will need to scroll below and follow the rest of the instructions for your particular operating system.

Running ADB on Windows

Make sure you have ADB running on your windows.

Download the ADB zip file for Windows

Extract the contents of this ZIP file into an easily accessible folder (such as C:\adb) *I recommend you to put and rename the folder into "adb"*

Open Windows explorer and browse to where you extracted the contents of this ZIP file

Then open up a Command Prompt from the same directory as this ADB binary. This can be done by holding Shift and Right-clicking within the folder then click the “open command prompt here” option. (Some Windows 10 users may see “PowerShell” instead of “command prompt”.)

Connect your smartphone or tablet to your computer with a USB cable. Change the USB mode to “file transfer (MTP)” mode. Some OEMs may or may not require this, but it’s best to just leave it in this mode for general compatibility.

In the Command Prompt window, enter the following command to launch the ADB daemon: adb devices

On your phone’s screen, you should see a prompt to allow or deny USB Debugging access. Naturally, you will want to grant USB Debugging access when prompted (and tap the always allow check box if you never want to see that prompt again).

Finally, re-enter the command adb devices. If everything was successful, you should now see your device’s serial number in the command prompt. Yay! You can now run any ADB command on your device!

How to unlock the bootloader.

Get the IMEI code for your device: type *#06# in phone dialer to find it out, note only the digits (no dashes)

At the bottom click 'Select your Device' and choose Sony Xperia 1

Enter your IMEI and check all the boxes then click Submit

Copy the code that shown and paste it to somewhere with notepad or you can just write it down on a piece of paper.

Turn off your phone. Press and hold the Volume Up button then connect the USB cable to PC. (Blue Light LED)

Open Command Prompt and type C:\adb\

Type this

fastboot devices

Type this

fastboot oem unlock 0x<insert your unlock code>

Insert your unlock code without the <>. If your code is 12345678900 then just type

fastboot oem unlock 0x12345678900

Congratulation! You have unlocked your bootloader.

Flashing and Rooting

You need to download the requirements below

Sony Xperia 1 Driver for Windows

XperiFirm from XDA

NewFlasher from XDA

UnSin (to change the .sin file into .img)

Magisk Manager from GitHub

Now we can proceed to the next guide.

Extract XperiFirm and UnSin to a Folder of Your Choice. I recommend you to extract UnSin on C:\\ directory folder then rename the folder to UnSin. It should be like this C:\UnSin\

Start XperiFirm and download the Firmware You want to use.

Select your device from the left-hand side. Then click on the latest firmware file that shows up on the extreme right.

All the details related to the latest firmware file will now be displayed. Go through the complete information and then hit the Download button situated at the bottom.

As soon as the download is completed, you will be greeted with the Unpacked Successful message. Click on OK.

Once downloaded, extract NewFlasher and copy and paste the all files of NewFlasher into the Firmware Folder

Now open the firmware folder and look for (boot_X-FLASH-ALL-A2CD.sin)

Copy and paste the file boot_X-FLASH-ALL-A2CD.sin into UnSin folder C:\UnSin\

Open Command Prompt and target to UnSin folder on C:

Type C:\UnSin\

Type unsin boot_X-FLASH-ALL-A2CD.sin

You will now get a .img file right besides the original File You just dropped on UnSin

Copy this .img File together with the Magisk Manager to your device Internal Storage.

Install the Magisk Manager, open it and choose Install. Select the File patching and look for the .img

Once the process is done do You get a "magisk_patched.img" on Your Internal Storage (Downloads)

Copy this "magisk_patched.img" to Your Fastboot Location (C:\adb\)

Now turn off Your Device, once off, hold Volume - (Down) and connect Your Device to Your PC (Green LED)

Start NewFlasher and say no to the first two Y/N questions. Say yes to all following...

Once the flashing is completed, disconnect Your Device until the green LED turns Off

Press and hold now Volume + (Up) and connect Your Device to Your PC again

Start the Fastboot process with:

fastboot flash boot magisk_patched.img

We are on a Treble Device with full A/B Support. So do now:

Type

fastboot --set-active=b

This will change the boot Slot to System B

Type

fastboot flash boot magisk_patched.img

This makes sure we have Magisk on both Systems / Kernels. Continue with

Type

fastboot --set-active=a

This sets the Primary System as boot Slot again

Finally, type

fastboot reboot

Your Device will now boot into the System. Install the Magisk Manager App again. Congratulations, your phone are now rooted

Source:

[Tutorial] Xperia Z1 Bootloader Unlocking/Relocking

UnSIN Tutorial

[GUIDE][WINDOWS] How to get Magisk / Root

How to Setup the Android Debug Bridge (ADB)