There were quite a few complexities involved. First off, not every Sony device comes with a working TWRP Recovery. Even does who do have to suffer from encryption issues. Then if we turn our attention towards rooting without using a custom recovery, it also had its fair share of issues. The biggest of which was the complexities involved in carrying out the entire process. For the unaware, to root any device without TWRP, you need to get the stock boot.img file, patch it via Magisk and flash it via Fastboot. The biggest issue with Sony devices is the fact that their boot file comes in a SIN format, which is not supported by Magisk and Fastboot Commands. And there was no help either in case someone wishes to make a conversion from SIN to IMG. But you could now put all these doubts to rest. Today, we will show you how to convert the boot.sin to boot.img and then root your Sony device via Magisk, without using TWRP Recovery. So without further ado, let’s get started.
How to Root Sony Devices via Magisk and Boot.Sin File
The below instructions are listed under separate sections for ease of understanding. Make sure to follow in the exact same sequence as mentioned. Furthermore, please take a backup of all the data present on your device beforehand. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.
Install Android SDK
First and foremost, you will have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform-tools folder, which will be used throughout this guide.
Enable USB Debugging and OEM Unlocking
Next up, you will also have to enable USB Debugging and OEM Unlocking on your device. The former will make your device recognizable by the PC in ADB mode. This will then allow you to boot your device to Fastboot Mode. On the other hand, OEM Unlocking is required to carry out the bootloader unlocking process. So head over to Settings > About Phone > Tap on Build Number 7 times > Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging and OEM Unlocking.
Unlock Sony Phone’s Bootloader
You will also have to unlock your device’s bootloader. Do keep in mind that doing so will wipe off all the data on your device and could nullify the device warranty as well. So if that is all well and good, then please refer to our guide on How to Unlock Bootloader on any Sony Xperia Device.
Convert Sony Boot.sin to Boot.img
Sony doesn’t upload their firmware on their server. As a result, you would have to carry out the download via a third-party tool. In this regard, the XperiFirm is the most trusted tool that does its job without any issues. Furthermore, once you have downloaded the firmware, extract it and you should get the boot.sin file.
However, this would be of no good and you will have to convert it to the IMG format. For that, you will have to use the Sony Dump Tool. All these instructions are given in the following guide, please refer to it: How to Extract Sony Boot.sin and get the Stock Boot.img File.
Patch Sony Boot.img/Boot.sin via Magisk
Now that you have got the Sony boot.img file from boot.sin, its time to root your device. Follow the below steps for that:
Boot Sony Device to Fastboot
Flash Boot.Sin/Boot.img File and Root Sony
That’s it. These were the steps to root your Sony device via Magisk and boot.sin file. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.