[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Rosepeter:
Messed up XZ2P - is there still hope?

Hi XDA,

I unlocked my bootloader on my XZ2P a while ago and I was still on

52.0.A.8.131

TWRP 3.3.1

and I wanted to upgrade it to

52.1.A.3.49-R6C

TWRP 3.4.0

As Flashtool refused to flash the new system downloaded with Xperifirm with the following log:

30/027/2020 23:27:56 - INFO - Flashtool 0.9.31.0
30/027/2020 23:27:56 - INFO - libusb version 1.0.23
30/027/2020 23:27:56 - INFO - Searching for a web proxy
30/027/2020 23:27:56 - INFO - A proxy has been found. Using it as default
30/027/2020 23:27:56 - INFO - Syncing devices from github
30/027/2020 23:27:56 - INFO - Opening devices repository.
30/027/2020 23:27:56 - INFO - Scanning devices folder for changes.
30/028/2020 23:28:00 - INFO - Pulling changes from github.
30/028/2020 23:28:00 - INFO - Devices sync finished.
30/028/2020 23:28:00 - INFO - Loading devices database
30/028/2020 23:28:00 - INFO - Loaded 129 devices
30/028/2020 23:28:00 - INFO - Starting phone detection
30/028/2020 23:28:02 - INFO - Device disconnected
30/028/2020 23:28:52 - INFO - Selected Bundle for Sony Xperia XZ2 Premium(H8166). FW release : 52.1.A.3.49. Customization : Customized_DACHBLX
30/028/2020 23:28:52 - INFO - Preparing files for flashing
30/029/2020 23:29:08 - INFO - Device connected in flash mode
30/029/2020 23:29:09 - INFO - Please connect your device into flashmode.
30/029/2020 23:29:11 - INFO - USB buffer size set to 512K
30/029/2020 23:29:11 - INFO - Opening device for R/W
30/029/2020 23:29:11 - INFO - Device ready for R/W.
30/029/2020 23:29:11 - INFO - Reading device information
30/029/2020 23:29:11 - INFO - Reading phone properties
30/029/2020 23:29:11 - INFO - Sending getvar:product
30/029/2020 23:29:11 - INFO - getvar status : OKAY
30/029/2020 23:29:11 - INFO - Sending Read-TA:2:2202
30/029/2020 23:29:11 - INFO - Read-TA status : OKAY
30/029/2020 23:29:11 - INFO - Sending Read-TA:2:2205
30/029/2020 23:29:11 - INFO - Read-TA status : OKAY
30/029/2020 23:29:11 - INFO - Sending Read-TA:2:2210
30/029/2020 23:29:11 - INFO - Read-TA status : OKAY
30/029/2020 23:29:11 - INFO - Sending Read-TA:2:4900
30/029/2020 23:29:11 - INFO - Read-TA status : OKAY
30/029/2020 23:29:11 - INFO - Sending Read-TA:2:10021
30/029/2020 23:29:11 - INFO - Read-TA status : FAIL
30/029/2020 23:29:11 - WARN - Unable to read TA unit 10021, error=-22 ( Hex unit value 00002725 )
30/029/2020 23:29:11 - INFO - Connected device : H8166 / SW release 1311-7919_52.0.A.8.131 / Customization 1313-2394_R7B
30/029/2020 23:29:11 - INFO - Last flash date : null
30/029/2020 23:29:11 - INFO - Phone ready for flashmode operations.
30/029/2020 23:29:11 - INFO - Start Flashing
30/029/2020 23:29:11 - INFO - Parsing boot delivery
30/029/2020 23:29:11 - ERROR - null
30/029/2020 23:29:11 - INFO - Sending Sync
30/029/2020 23:29:11 - INFO - Sync status : OKAY
30/029/2020 23:29:11 - INFO - Sending powerdown
30/029/2020 23:29:11 - INFO - powerdown status : OKAY
30/029/2020 23:29:11 - INFO - Device connected in flash mode

I decided to try to update TWRP only as described at the beginning of this thread. I was able to boot into TWRP 3.4.0 fine and everything looked good, but after "Install recovery ramdisk" and booting into the installed recovery, the touch screen was totally unresponsive, so I was not able to select to boot into the system. Then I tried to fix this up by again booting into TWRP via fastboot, but here I seem to have messed up something and ended with a "Your device is corrupt."

The I tried to flash 52.1.A.3.49-R6C using newflasher and according to newflasher everything went fine and also the "Your device is corrupt." does not appear anymore. However, the phone seems to be stuck in a boot loop and when booting into TWRP via fastboot, TWRP tells me that no OS is installed when I try to reboot into the system. When trying to flash via Flashtool it still claims to see "Connected device : H8166 / SW release 1311-7919_52.0.A.8.131 / Customization 1313-2394_R7B", so I doubt that newflasher really flashed anything successfully.

Is there any hope I can debrick my phone again? Any help is appreciated - thanks in advance!

Ciao

Fabian