How to Root XZ2 (probably also XZ2c) in Android 10
2 mins to read
I wrote this article early on, I can't remember the exact date or details, the content is for reference only, thank you!
This post was originally posted on XDA Developers
Android 10 comes earlier than expected, but there's no twrp to flash Magisk to gain root access. I tried to use SAR method to patch boot image, and it actually worked:
- A PC with ADB environment setup. * If you are using macOS, try to use a Virtual machine instead.
- XperiFirm to download Android 10 firmware.
- Magisk Manager App.
- unsin.exe program to extract sin file.
download the latest Android 10 firmware from XperiFirm, the current one is 52.1.A.0.532
open the downloaded folder and find boot_X-FLASH-ALL-B6B5.sin file. it may vary on XZ2C, but it surely will start with
unsin.exeto extract boot image, then you will get
boot_X-FLASH-ALL-B6B5.imgin the same directory.
Copy boot_X-FLASH-ALL-B6B5.img into your phone.
Install Magisk manager app, and make sure your phone is connected to the internet
Press Install → Install → Select and Patch a File, and select
Copy the patched image from your device to your PC, then flash it with fastboot command:
fastboot flash boot_a magisk_patched.img fastboot flash boot_b magisk_patched.img fastboot reboot
after reboot the devices, your XZ2 is should be rooted, but it probably not pass SafetyNet Check, you can use MagiskHide Props Config Module to fix it.
I can't find the way to leave the boot image and patched boot image down below as the attachments, but even if I did, I still suggest to do it manually, just in case I am an idiot and it might broke your phone.