In this guide, we will show you the steps to root any Sony device using Magisk and the boot.sin/init_boot.sin file. While Sony devices are now just shadow of its yesteryears, but it still manages to churn out some decent handsets every now and then. However, on the flip side, it isn’t usually associated with custom development. There aren’t many mods, tweaks, or customizations that you could carry on your devices. One major reason for the same is the fact that rooting Sony devices were never a cakewalk.
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.
Table of Contents
How to Root Sony Devices via Magisk and Boot.Sin/Init_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/init_boot.sin to Boot.img/init_boot.img
NOTE: If your device came with Android 12 or older versions out of the box, then you’ll have to deal with the boot.img file for rooting purposes. On the other hand, if it came with Android 13 or higher versions, then use the init_boot.img file.
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//init_boot.img via Magisk
Now that you have got the Sony boot.img/init_boot.img file from boot.sin/init_boot.sin, its time to root your device. Follow the below steps for that:
- First off, install the Magisk App onto your device
- Likewise, make sure that the boot.img has been transferred to your device.
- Then tap on the Install button situated next to Magisk.
- From the Method section, choose Select and Patch a file.
- Browse to the extracted boot.img/init_boot.img file and select it.
- Then tap on the Let’s Go option situated at the top right.
- Magisk will now load the boot.img file and will patch it accordingly.
- Once that is done, you would get the Download Complete message.
- The patched boot image file will be saved in Internal Storage > Downloads. The name of the file will be magisk_patched.img (if there are a few random characters at the end, then delete them so that the name becomes magisk_patched.img).
Boot Sony Device to Fastboot
- Connect your device to the PC via USB cable. Make sure USB Debugging is enabled.
- Then head over to the platform tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
- Type in the following command in the CMD window to boot your device to Fastboot Mode:
adb reboot bootloader
- To verify the connection, type in the below command. You should get the device ID followed by the Fastboot keyword, signifying that the connection has been successfully established.
fastboot devices
Flash Boot.img File to Root Sony
This method is for those devices that came with Android 12 or older versions out of the box. Moreover, it is always recommended to first boot your device via the patched boot.img, rather than directly flashing it. This way you will be able to check if everything is working well or not. If everything is on the good side, then you may proceed to the permanent root. So use the below command to boot your device via magisk patched boot.img and hence attain temporary root.
fastboot boot magisk_patched.img
Now that your device is booted without any issues with a temporary root, let’s now make this root permanent. So refer to the below instruction steps to try it out.
- Launch the Magisk app and tap on Install.
- Then tap on Direct Install (Recommended) > Let’s Go situated at the top-right.
- [NOTE: If you get a Require Additional Setup prompt, then tap on OK and you’ll be automatically taken to the Install section from where you could select Direct Install > Reboot].
- Once done, hit the Reboot button situated at the bottom right.
- That’s it, your device will now boot to the rooted OS.
Flash Init_Boot.img to Root Sony
This is for those Sony devices that came with Android 13 or higher versions out of the box. Moreover, as opposed to the boot.img methods, the init_boot does not support the temporary root, so you’ll have to directly flash the file to obtain the permanent root in one go. Here’s how it could be done
- Transfer the magisk_patched.img file [patched init_boot.img] to the platform-tools folder.
- Then type in the below command in the CMD window to flash this patched file:
fastboot flash init_boot magisk_patched.img
- Once that is done, reboot your device to the OS via the following command:
fastboot reboot
That’s it. These were the steps to root your Sony device via Magisk and boot.sin/init_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.