[Google Pixel 2 XL Questions & Answers] simplepinoi177:
great!

First and foremost, to anyone who might follow these commands and steps; CAUTION & BEWARE! These are going to be done on a seemingly permanently broken/bricked device; if anything, we're only going to make it "brokener"! These are "last resort" type stuff and can &

will

void any warranty! Also, say goodbye to any data and settings you had before this...

On that note & contrary.....I've actually have been able to execute these in an attempt to rescue my device. I'm uncertain how much and how for sure these commands and processes helped, but I have been able to do these and been able to "come out of the other side"....but, then again, if there are any errors, just continue on, because I can't quite test and try out these commands and I can't remember if applying "_a" & "_b" comes out without anything or not....so please keep that in mind

So, first and foremost, re-download platform-tools and place it in a directory close to a root folder and/or not too far down the path tree (either the root folder C:\ or D:\ if you have, or the desktop). Then, please download this Full Factory image

HERE

: https://dl.google.com/dl/android/aosp/taimen-pq3a.190605.003-factory-59303ad9.zip

Important NOTE: This is an image for a taimen/Pixel 2 XL, it will be a bit of a disaster if you flash this image to another model...

Then, after booting into the bootloader, and connecting the USB cords, confirm you are connected by running the command

fastboot devices

After, do me a solid and run the

fastboot getvar all

for me and if you can post the output, that'll be great.

Also, if you can do me a solid, running the

fastboot flashing unlock_critical

, just for funsies...

After all that is settled, let's begin with the formatting...

we'll be formatting, then erasing, in hopes that running the "flash-all" will properly re-format and re-initialize the partitions and system...

we'll start with

fastboot format system

, then for good measure (and i'm not good at coding and syntax)

fastboot format system_a

&

fastboot format system_b

&

fastboot format system_other

then

fastboot format userdata

then

fastboot format boot

fastboot format boot_a

fastboot format boot_b

and lastly

fastboot format dtbo

fastboot format dtbo_a

&

fastboot format dtbo_b

. Hopefully that's everything...at least it's everything I can think of that I'm comfortable with...

Now we're gonna be erasing the same and hope that "preps" the flash-all Full Factory factory image into doing its "thing"...

we'll start with

fastboot erase system

, then for good measure

fastboot erase system_a

&

fastboot erase system_b

&

fastboot erase system_other

then

fastboot erase userdata

then

fastboot erase boot

fastboot erase boot_a

fastboot erase boot_b

and lastly

fastboot erase dtbo

fastboot erase dtbo_a

&

fastboot erase dtbo_b

. (hopefully I didn't miss a changing of "erase" with "format"...)

Once done, extract taimen-pq3a.190605.003-factory-59303ad9.zip and copy all the files to where adb and fastboot .exe files are (you should be familiar with the drill now). Let us edit the flash-all.bat file and remove "exit" at the end; we are

NOT

going to remove the "-w", we will leave that intact.

then simply run

flash-all.bat

and we'll cross our fingers and hope for the best!

If all this doesn't work, I suggest attempting this all again, but reverse it and "erase" first, THEN "format". Then running the flash-all...

And if that doesn't work, I suggest doing it all again, but ONLY the "format" part. Then running the flash-all again...

And if that doesn't work, I suggest doing the previous step, but after the formatting but before the flash-all, you extract the stock boot.img and dtbo.img from within the .zip of the Full Factory image, move them where the adb and fastboot .exe files are, and manually flash those images to their respective partitions using the command

fastboot flash boot boot.img

and

fastboot flash dtbo dtbo.img

, then running flash-all...

And if that doesn't work, then ONLY the "erase" part. And then, of course, the flash-all...

And man.....if it doesn't work after even all of that, and you realllly wanna try something out... retry the format code, but add something like

format raw:0x2800000 boot

(if you look at the output of your "getvar all", you can see what to input in terms of type : hex size).

And, finally, my last bit of advice, is if all else fails, retry the format code and change it from "ext4" to "raw", or vice-versa.

When I, myself, had messed around with all of this, I even changed the size of the partition by changing the hex code (0x@@#######) to see if that did anything; and if anything, to see if the flash-all would re-partition the partition if it detected the difference...

And that's it...I've done all that, and is the farthest I've went in terms of erasing, formatting, and modifying certain/all partitions (at the time I was going after the "max target size" type error) and all that I've got in ideas in terms of restoring the device to a stock state....

I hope you are willing to do any/all of this, and that something here causes it to work so you can have this device working once again. Good luck and hope this becomes helpful....!