I have a relatively old xperia xz premium [g8141] and since the look is getting quite old I thought why not root it? or maybe flash a rom.
So I started by unlocking the bootloader using sony's tutorial, and then flashing the latest version of TWRP (twrp-3.3.1-0-maple) using ADB (you need to Install the Adb drivers, you can do that by installing Xperia Companion). I flashed TWRP 3.3.1.0-maple (I don't recommend this version for reasons listed at the end) by doing these steps:
After successfully flashing the stock rom I flashed Magisk using the tutorial on theirwebsite.
Everything seemed to be running fine, but then TWRP failed to backup due to a "\data" partition error, and when I fixed the error using this youtube video, the phone gut stuck in a bootloop, and flashing the stock rom agian also resulted in a bootloop. After searching xda for a solution I found out that Flashtool64 isn't recommended for flashing xzp and that you should use newflasher. That fixed the bootloop issue caused by Flashtool64.
But I still had some issues installing a new rom like ExistenZ Pie, the issues were TWRP faild to wipe Data (the "\data" partition error mentioned earlier). Turns out the latest version of TWRP had some bugs and version 3.2.2.0 worked fine and had no issues.
So I recommend these to avoid having problems:
The stock rom I used is [47.2.A.10.107] on my xzp [g8141] and all these worked with it:
**DO AT YOUR OWN RISK**
I'm not responsible for any damage, this is just the way I did it
I hope you benefit from my mistakes.
So I started by unlocking the bootloader using sony's tutorial, and then flashing the latest version of TWRP (twrp-3.3.1-0-maple) using ADB (you need to Install the Adb drivers, you can do that by installing Xperia Companion). I flashed TWRP 3.3.1.0-maple (I don't recommend this version for reasons listed at the end) by doing these steps:
- Moved the platform-tools to the C:\ directory.
- Moved the TWRP img file to the same directory and renamed it to "recovery.img".
- Opened the cmd in the same folder and entered "adb reboot bootloader" to boot in fastboot mode.
- Entered "fastboot flash recovery recovery.img" to flash TWRP.
- Entered "fastboot boot recovery.img" to boot into TWRP.
After successfully flashing the stock rom I flashed Magisk using the tutorial on theirwebsite.
Everything seemed to be running fine, but then TWRP failed to backup due to a "\data" partition error, and when I fixed the error using this youtube video, the phone gut stuck in a bootloop, and flashing the stock rom agian also resulted in a bootloop. After searching xda for a solution I found out that Flashtool64 isn't recommended for flashing xzp and that you should use newflasher. That fixed the bootloop issue caused by Flashtool64.
But I still had some issues installing a new rom like ExistenZ Pie, the issues were TWRP faild to wipe Data (the "\data" partition error mentioned earlier). Turns out the latest version of TWRP had some bugs and version 3.2.2.0 worked fine and had no issues.
So I recommend these to avoid having problems:
- Backing up your data before trying anything.
- Using newflasher for flashing instead of Flashertool64.
- Using TWRP 3.2.2.0 instead of TWRP 3.3.1.0.
The stock rom I used is [47.2.A.10.107] on my xzp [g8141] and all these worked with it:
- version 3.2.2.0. (TWRP 3.3.1.0 didn't)
- Latest version of Magisk.
- EdXposed caused me some crashes but worked. (using Riru Core)
- ExistenZ Pie. (had no issues, and the Camera still works)
**DO AT YOUR OWN RISK**
I'm not responsible for any damage, this is just the way I did it
I hope you benefit from my mistakes.