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:

Steps:

  1. 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 ;)
  2. Connect your phone (instructions are in Emma’s help menu)
  3. 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 two FILE_NNNNNNNN type files, pick the largest, right click and “Extract Here” (it’s just a common archive).
  4. Go into the newly extracted folder, and extract your Sony Dump Tool inside it.
  5. Move boot_X-FLASH-ALL-B6B5.sin into the sony dump tool folder.
  6. Run the sony dump tool on the sin file.
  7. unplug your phone, turn it on, and connect it to the computer with adb
  8. Transfer the extracted img file, and the Magisk apk to your phone, and install Magisk.
  9. Run magisk and use it to patch the boot.img file you transferred, then send it back to your computer.
  10. Execute adb reboot flash to enter fastboot on your phone
  11. Once you see the phone with fastboot devices, execute fastboot flash boot PATH_TO_MAGISK_IMG
  12. LAST STEP! Boot up the phone, and from inside the Magisk app, install Magisk onto the bootloader again.

CONGRATS! That’s it.

About the author

Mikal ____ is a security-conscious, technologically minded carbon-based lifeform seeking efficiency and higher- order solutions to a stochastically governed and little-understood universe.