[Nexus 5X Q&A, Help & Troubleshooting] bken:
tl;dr summary:

- Replaced screen, worked for 1 week

- Randomly switches between hard-brick no response, and soft-brick boot loop

- Boot loops on loading TWRP as well as OS

- Running latest 7.0.0 NBD90W

- Phone is H790 variant

- Flashed Android 7 in the bootloader, not through OTA. This was as soon as Nougat came out, and it worked great for weeks.

- Bootloader unlocked (for temp-booting twrp only, "fastboot boot twrp.img" otherwise kept stock)

- Phone NEVER rooted

- No charging indicator when plugged in

- Battery bent during previous removal, maybe causing issues a week later?

Replaced screen with genuine LG front frame assembly after a running accident cracked my screen/digitizer. Phone worked fine for about a week, then randomly shut off and went into a boot loop.

Now it randomly switches between a boot loop and a hard brick. When it's acting like a hard brick, sometimes it goes back into boot loop temporarily if I disconnect and reconnect the battery. It eventually returns to hard brick.

Hard brick mode:

-- Doesn't respond to any power button presses. Does not indicate charging when plugged in. Entirely unresponsive.

Soft brick mode:

-- Normal boot: normally gets to Google logo and restarts. Rarely makes it to the flashing dot animation. Twice has booted into Android, past the lock screen, and works perfectly for ~10-15 seconds before rebooting.

-- Boot into bootloader: On occasion will reboot itself from bootloader, but rare. Usually works correctly including all adb commands.

-- Boot into stock recovery: Same as bootloader, usually works, sometimes reboots.

-- Boot into TWRP 3.0.2-2 bullhead: boots for a few seconds and then locks up. Has never made it through decryption - will either a) freeze and reboot right after I draw my pattern, throwing an error that it could not mount storage right before restarting or b) freeze and reboot anyway if I take too long before drawing my pattern. It seems to be more time-based than a function of anything I do.

Things I've tried:

Since my bootloader is unlocked, I've re-flashed these partitions with no fix:

bootloader.img

boot.img

recovery.img (stock)

radio.img

vendor.img

I've cleared cache through stock recovery, can't remember if I tried flashing cache.img

I have yet to flash system.img or userdata.img as I have a few files I'm trying to recover... The fact that I can't boot into TWRP, and the sporadic hard-brick behavior, doesn't give me enough confidence that wiping my data will help.

Phone tends to live in hard-brick mode unless I disconnect and reconnect the battery, then it sometimes goes into soft-brick boot loop for a while before once again hard-bricking itself. When hard bricked, no charging indicator appears when plugged in. When soft-bricked and turned off, will sometimes display the battery status after short-tapping the power button. No change when plugged in except only once it displayed the battery with lightning bolt icon for about 2 minutes, before returning to the icon without the lightning bolt.

My best guess is that I damaged the battery during removal.

- The adhesive was really strong, and while I didn't puncture the case, I did bend it somewhere between 30-45 degrees in the process. If I damaged the Li-Po foil, would that make sense for the phone to work, only to go belly-up a week later? I ordered an OEM LG battery for $13 because it's worth a shot at that price point. Arriving next week.

- The reboots sound in-line with it crashing when it tries to draw too much power? Bootloader and stock recovery usually run okay and I assume have a low power draw. The OS and TWRP probably draw more power and that's where it fails? The reboots seem to be more time-dependent than depending on anything in particular that I do, such as rebooting before OR after drawing my pattern on TWRP. And that it sometimes boots into full Android for a few seconds implies to me that the OS is working on at least some level.

Does anyone have any better ideas for when the new battery inevitably doesn't fix it, or things to try in the meantime? Could the common Nexus 5X boot loop under Nougat be causing issues booting into TWRP too? It feels hardware-related to me. I took it all apart and looked for loose/oxidized/bent contacts on all the connections but couldn't spot anything.

My Pixel isn't arriving until Nov 23-25, and to make matters worse I switched to Google Fi 3 days ago and I have no compatible phones to use in the meantime. Oops, lesson learned.