How to flash a factory image onto a Nexus 5x with locked bootloader? This happened today:


I was using my Nexus 5X when it suddenly started rebooting.
It got stuck in a bootloop. It would never boot past the Google logo and I couldn't turn it off.
I was able to enter fastboot mode and even recovery mode from there.
I wiped the phone from recovery mode which didn't help.
I left the phone lying with the fastboot menu open because I thought maybe it is overheated and will cool down (it was slightly warm).
When I returned, the phone was off. I started it and this time it went past the Google logo up to the Android logo (with the animation). However, after displaying "Android" it would just power off.
I tried to boot it a few times but it would never go past the Android logo. Eventually the bootloop started happening again.
I am now back to step 2 except I can't enter recovery mode any more. If I choose recovery mode from the fastboot menu, I never see the lying Android figure with the exclamation mark.


I found many tutorials about fixing bootloops on the Nexus but they all seem to require an unlocked bootloader.

The bootloader on the device is locked. I can see the device in fastboot devices but I can't unlock it.

Any idea how to repair this? Can I somehow flash a factory image onto the device even though OEM unlock is disabled? There is no data on the device that would need to be preserved. I'm ideally looking for a Linux-based solution.
The only possible way for you to get "OEM unlocked" is to freeze your phone and then turn it on, hoping that it will boot normally again. (Put phone in an airtight plastic bag and place it in freezer for about 1h.)

However, the Nexus 5x bootloop problem is a hardware problem which cannot be fixed using software. (One processor core is broken and as it is turned on during boot, the device crashes.) The XDA work-around simply disables the broken core, I think, but this leaves you with a slower phone.

Since you don't need to save any data on your Nexus, I'd spend my time finding a (cheap? second-hand? lineage-os/treble-ready?) replacement device.