1. Are you ready for the Galaxy S20? Here is everything we know so far!

I bricked my Sony Xperia XZ2 Compact!

Discussion in 'Android Help' started by avilqu, Aug 24, 2020.

  1. avilqu

    avilqu Lurker
    Thread Starter

    Hi everyone,

    So yeah, I probably shouldn't have played around with recovery, bootloaders and custom OS, but my XZ2 Compact was rendered nearly useless by the last Android update, so I tried to install the new official Lineage OS on it. But I failed. Hard.

    • The phone now only reacts to the power button. When I press it, it displays a battery charge icon for a minute or two, then the screen turns off.
    • None of the other physical buttons do anything, and the button combinations don't work. As a result, I can't boot to recovery, or even access to fastboot.
    • The light indicator is on and red.
    • I let the phone drain its battery, see what happens, and well, nothing. Eventually the screen stops turning on. When I replug the phone, even if I don't touch anything, it will end up showing me the battery icon again, and is stuck in the same loop.
    • 'adb devices' still sees my phone, but with no permissions. 'fastboot devices' doesn't see anything.
    • On Windows, Emma (Sony's flashing tool) doesn't see the device.

    I was following this tutorial. I went up to "temporarily booting a custom recovery using fastboot". I used the latest LineageOS recovery for my phone, and the flashing worked fine according to the output of the fastboot command. But that's all. Impossible to do anything after that.

    Do I now own a glorified paper weight? Or can I save this?


  2. Hadron

    Hadron Smoke me a kipper...
    VIP Member

    It's been a couple of years since I flashed anything, but there's a line in that tutorial that has all sorts of alarm bells ringing.

    The structure of the fastboot flash command is "fastboot flash <partition> <image file>". The command to boot a device temporarily using an image (usually recovery) is "fastboot boot <image file>".

    That tutorial tells you to use "fastboot flash boot recovery.img". That should permanently flash your recovery image to the boot partition, i.e. the kernel. It's possible that Sony have some non-standard fastboot module (some phones do accept non-standard commands), but I think it's most likely that whoever was typing that got the commands muddled, or else did a copy/paste and didn't edit it properly. In any event, I'm sure that's what went wrong.

    Without specialist equipment the only way I can think of to recover this is to reflash the phone (just reflashing the boot image might do it is that's the only thing that's corrupted, but I can't guarantee that it's not spilled out and corrupted something else). I don't know the stock reflashing method for Sony devices, but it presumably involves the tool you mention. It might be possible to reflash from fastboot mode if you have the system images, but from what you say it doesn't sound like "adb reboot bootloader" is working (and the button combinations definitely are not). I fear that unless you can get fastboot to respond you are out of luck.

    The one real oddity is that adb responds. ADB requires either that you are in a custom recovery or that you are running android with USB debugging enabled (and, these days, the computer authorised to use usb debugging). It seems unlikely that you could boot into Android (and my guess is that that's the reason the Sony flashing tool doesn't see anything), but it also doesn't sound like you are in recovery (which, if the wrong partition were flashed, would not be the custom recovery anyway). So I'm a little puzzled that "adb devices" produces a response. That is the one ray of hope, of course, but adb won't be enough to fix this. I think you need fastboot, which means getting into the bootloader (and I'm just hoping that the bootloader hasn't been corrupted).
  3. avilqu

    avilqu Lurker
    Thread Starter

    Thanks a lot for the answer.

    I suspect that my phone is actually in a corrupted recovery, as this happened after flashing the LineageOS recovery image. I assume I could get into fastboot if I somehow managed to actually turn off the phone and on again, pressing volume +, but I just can't seem to turn it off. The power button is the only one responding, it turns the screen on with the charging icon (note that this is a smaller, different charging icon than usual, which makes me think I'm actually on that recovery I tried to flash), and the led indicator is solid red, even when the screen is off.

    I even tried to completely drain the battery, but as soon as I re-plug the phone it goes back into that same state even when I don't press any button. I tried re-plugging to a computer holding volume + from a drained battery: same result.
  4. Hadron

    Hadron Smoke me a kipper...
    VIP Member

    The thing I don't understand about the "in the lineage recovery" theory is that the "fastboot flash boot" command should flash the image to the boot partition rather than boot you into the recovery image. So if you are in the Lineage recovery, I cannot see how you got into it!

    Maybe you are in the stock Sony recovery module? I don't know what that would look like, but I've experience with HTC who hide the recovery menu (in their case it's power+volume-up at the same time to show the menu) so can't be sure Sony don't do something similar. However I can't find anything that suggests Sony don't use the standard Android recovery, and I'd not expect that to respond to adb at all, so it doesn't really fit either. The main reason I suggest this is that I can see how it would happen (with phone firmware corrupted the phone defaults to recovery mode, and as you didn't actually flash the recovery partition that should contain the stock module).

    If I think of any other way of restarting I'll let you know. Not much coming to mind at the moment.
    ocnbrze likes this.
  5. avilqu

    avilqu Lurker
    Thread Starter

    SOLVED! I managed to stop the charging loop with a key combination I discovered: volume up + volume down + power for about 10s. Then was able to load the bootloader and re-flash a recovery, custom ROM etc. Thank you for your help.
    ocnbrze likes this.

Share This Page