[Google Pixel 2 XL Questions & Answers] simplepinoi177:
So, actually, I strongly suggest using CMD versus PowerShell. If anything, you make sure to run it “as Administrator” (either by right-clicking, or searching Command Prompt and right-clicking) and then directing to and running the flash-all.bat. And to keep the window from closing, you edit the file – in the same way you would to remove the “-w” – by right-clicking and selecting “Edit”. At the very end, remove/erase the word “exit”; this should keep it from closing out the window. You should do this from here on out. Also, you probably don’t have to do the “./” thing, but I’m not sure if it matters at all or not.

At this point, I (personally) would go through the process of manually formatting the system, boot, dtbo, and data partitions using fastboot commands in the bootloader; but I’m worried it might affect the bootloader in some inadvertent way and completely brick the device – which is why I’d only do it myself with only myself to blame. I super really bricked one device already by accidentally formatting the bootloader partition, then before reflashing/re-installing the stock bootloader, I accidentally rebooted and I couldn’t even recover anything because there was no Bootloader Mode to do it from. So what I suggest to you is this…

I suggest you download TWRP image file and temporarily boot into that custom recovery to “wipe” and format everything. You can do this by downloading and moving the TWRP .img file to the platform-tools folder that has the adb and fastboot executables/files. Then run the command “fastboot boot twrp.img” (replace “twrp” with the actual file name). In there, I would go to the “Wipe” section and wipe the system, data, and internal storage partition – If there was an option to wipe the boot partition I would suggest that; but we’ll get to that if need be – if you go into the “Advanced Wipe” section. While there, you might even try the “Repair or Change File System”. After all of this, you should reboot back into the bootloader and load up a CMD after clicking “Run as Administrator” and run the flash-all.bat again.

If it still is struggling afterwards, you might want to try obtaining the stock boot.img and dtbo.img -- you should be able to find it in the Full Factory image .zip file; you just have to delve deep enough through the multiple .zips -- and manually flashing it to the device; command would be “fastboot flash boot boot.img” & “fastboot flash dtbo dtbo.img” – remember you will have to move the .img files to the same platform-tools folder as fastboot and adb .exe files.

Some thoughts; I really wonder if it is the new Q/10 OS version or something and/or the new way Google has assembled the Full Factory images, but most of the time running the flash-all with the “-w” intact resolves any boot and system issues! None of these steps are usually necessary further than that. I was suspecting something was happening in the flashing, but your log shows that everything is flashing and installing without error. I might’ve even suggested that you redownload and check the checksum (SHA-256), but then again you would have had a bunch of errors if even one byte was off!

Here’s hoping one of these things works…good luck to you!