I’ve been an avid Sony Xperia fan since the X compact, and although their Developer Site is awesome, support for rooting is pretty minimal compared to some other mainstream phones. Hopefully, this blog post will help with that.
Required Software:
- Sony Flash Tool
- Latest Magisk release
- Sony Dump Tool
- And the xperia phone itself.
Steps:
- Install Emma (the Sony Flash Tool), adb, fastboot, and other required android dev software to be able to connect and flash your phone. Getting this working can be tough, but there is already a lot of info out there so I won’t go into it. Use google ;)
- Connect your phone (instructions are in Emma’s help menu)
- Flash the latest software to the phone. This will create a local folder with the software date, within the Emma application folder, under
Xperia Flash Tool\2021-10-19-182722\localstorage\Special1
for example. You’ll find twoFILE_NNNNNNNN
type files, pick the largest, right click and “Extract Here” (it’s just a common archive). - Go into the newly extracted folder, and extract your Sony Dump Tool inside it.
- Move
boot_X-FLASH-ALL-B6B5.sin
into the sony dump tool folder. - Run the sony dump tool on the sin file.
- unplug your phone, turn it on, and connect it to the computer with adb
- Transfer the extracted img file, and the Magisk apk to your phone, and install Magisk.
- Run magisk and use it to patch the boot.img file you transferred, then send it back to your computer.
- Execute
adb reboot flash
to enter fastboot on your phone - Once you see the phone with
fastboot devices
, executefastboot flash boot PATH_TO_MAGISK_IMG
- LAST STEP! Boot up the phone, and from inside the Magisk app, install Magisk onto the bootloader again.
CONGRATS! That’s it.