How to Root XZ2 (probably also XZ2c) in Android 10
Jan 6, 2020
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.
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.
1. download the latest Android 10 firmware from XperiFirm, the current one is 52.1.A.0.532
2. open the downloaded folder and find boot_X-FLASH-ALL-B6B5.sin file. it may vary on XZ2C, but it surely will start with `boot_X-FLASH-ALL` .
3. drag the
unsin.exeto extract boot image, then you will get
boot_X-FLASH-ALL-B6B5.imgin the same directory.
4. Copy boot_X-FLASH-ALL-B6B5.img into your phone.
5. Install Magisk manager app, and make sure your phone is connected to the internet
6. Press Install → Install → Select and Patch a File, and select
7. 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.