[Sony Xperia XA1 Questions & Answers] DoneGoofed:
Hi all,

Due to some supidity on my part, and a small share of bad luck I have hard bricked my Xperia XA1 G3125 phone. I'm posting this with a couple of questions at the bottom in the hope that someone can suggest something useful, or that someone will read this and avoid a similar fate. If you are considering rooting a Sony Xperia XA1 G3125, especially if you are running android 8.0 then please read this post.

My goal was to root the phone so that I could install the Xposed module

I unlocked the bootloader with the Sony website (https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/)

I already had ADB with a generic android USB driver. I later installed the specific sony ADB driver (Sony so0119 ADB interface driver) as part of troubleshooting but the two appear to function exactly the same.

For TWRP I followed this guide by JanJan (https://xdaforums.com/xa1-ultra/development/g3221-built-sources-t3622886). I downloaded the correct release for my phone model and flashed the recovery and boot images. Here was my first mistake, I (stupidly) thought that flashing the boot was a necessary step for installing TWRP. I am given to understand that I should have executed "fastboot boot boot.img" to test the boot image before flashing it to my storage. The recovery image worked great (props to JanJan), but now my phone was soft-bricked. It could boot to bootloader and TWRP recovery, but booting it normally led it to stall on a white screen with black sony text on it. For any of you intending to install TWRP, I would recommend this guide (https://www.getdroidtips.com/twrp-recovery-sony-xperia-xa1/). Follow the steps carefully and hopefully avoid bricking your phone.

At this point, I played around with a few more boot images from this post (https://xdaforums.com/xa1/development/xperia-xa1-plus-stock-kernel-advanced-t3729856). As those of you with some experience might expect, none of them worked. I decided to cut my losses and attempt to restore my phone to stock through the Xperia Companion software. Unfortunately, because the bootloader had been unlocked the Xperia Companion software would no longer perform a factory reset on my phone. For those of you seeking to unlock the bootloader, please be aware of this.

I then attempted to flash the stock rom using Newflasher as according to this guide (http://www.xperiablog.net/2018/01/2...-firmware-for-xperia-xz-premium-xz1-and-more/) but Newflasher failed to find my phone when connected via usb. Part of this guide, though, involves installing the Sony Mobile Flashtool by Androxyde. When Newflasher didn't work, I used the flashtool by Androxyde in an attempt to flash the stock rom. My phone was (I believe) charged to at least 70-80% but I still encountered an error during the flashing process. I'll post the full log at the bottom of this post, but the offending lines appeared to be

For those of you seeking to restore the phone to factory setting, I would recommend Emma instead of Androxyde's tool. Emma appears to be the officially endorsed solution by Sony, and I would assume it is less likely to brick your phone.

I disconnected and attempted to reboot my phone, but no luck. If I boot normally, no reaction from the phone. If I hold down the on key, no reaction from the phone. If I boot into recovery (vol down + power button), the light flashes white for half a second, followed by no response from the phone. Connecting the phone via usb causes the LED light to turn red, but no further response by the phone. Connecting the phone in bootloader mode (vol up button) again causes the LED light to turn red and no further response from the phone.

When connected via usb (bootloader or no), the phone could not be recognised by anything. After reinstalling the drivers (Sony so0119 ADB interface driver), it can be recognised by device manager. Currently, it cannot be recognised by the Xperia Companion or the Emma tool. Androxyde's tool detects it, but indicates that "Device connected with USB debugging off". It then cycles every ~30 seconds between device disconnected and device connected with USB debugging off. you can see this in the logs posted below.

I've exhausted everything that I can think of (in my limited experience) to fix this phone. If anyone would like to offer advice (or commiseration) then I am all ears. I backed up all of my user data with the Xperia Companion tool before beginning this entire process. Two questions I would ask:

If I obtain a new Xperia XA1 G3125 running android 8.0, can I use the companion tool to transfer my old backed up user data to the new phone?

Is it possible/feasible to rescue a phone from hardbrick by physically replacing the internal storage and/or other components? I lack the technical expertise for this, but I'm planning to contact Sony tech support or a third party phone repairer as a final attempt to rescue this phone.

At the very least, I do hope that someone reads this and is able to avoid my mistakes. To repeat, do not flash the boot image unless you are 100% sure that it will work, and you have made all reasonable attempts at backing up your current boot image.

Cheers,

DoneGoofed