[Google Pixel 2 XL Questions & Answers] simplepinoi177:
Hey [MENTION=8133855]jan_ruc[/MENTION]... I have a couple of suggestions, but you're gonna have to humor me a bunch....

I've actually personally ran into this issue (max-download-size). And I'm still using the same phone -- which means that I didn't have it sent out for replacement/RMA...

I'd like to say "...So let's go about this from scratch & at the very beginning...", but I took a look at your picture on post #22 and I noticed something; looking at the syntax, there seems to be an inadvertent space when "calling" for the slots, I believe you will have progress if you "edit" Deuces script and make sure there is

NO

SPACE between "slot" and the underscore (_) -- it should look like "Slot_a" instead of "Slot _a". In programming/coding, a space is actually considered an actual character....

Also, I'm very confused as to why GetVar All doesn't work.

In any case, in case the above suggestion doesn't work or bear any fruit/progress, "So, let's go about this from scratch & at the very beginning..." (if anything, to determine through process of elimination [kind of])...

Download the Pixel 2 USB driver (the .zip file) here: https://developer.android.com/studio/run/win-usb

Skip download/using the "Android SDK Manager", and download the latest platform-tools here: https://developer.android.com/studio/releases/platform-tools (download the .zip for windows; when extracted, it will show version r28.0.0)

Download the latest taimen Full Factory image (OPM2.171026.006.C1) here: https://dl.google.com/dl/android/aosp/taimen-opm2.171026.006.c1-factory-21236059.zip (you may need to do the whole "acknowledge" thing for the website first...)

then try these steps...

Extract and install the USB driver (from the .zip file)

extract platform-tools from the .zip, showing version r28.0.0

extract the Full Factory .zip

move all files (6 files) to the platform-tools folder with (or where there is) adb and fastboot .exe files along with other files and folders (I have had other users merely move the adb.exe and fastboot.exe files to the extracted Factory folder, so that's why I state and direct this way)

edit the flash-all.bat file -- to edit: right-click. If there are more than one flash-all files and you do not know which one to edit, you need to go to Folder Options(can be found in Control Panel and in Quick Tiles of a folder view [Windows 10]), go to the tab View, and untick "hide extensions for known file types" -- and remove the "-w" & the word "exit" at the very end in the code/syntax

*make sure you save the file! either manually save and/or when you exit, it will warn and ask you if you want to save; and save.​

make sure phone has USB debugging enabled

*it might also help to revoke all USB authorizations, and then in the next step keep looking at the screen to select "Accept" and reauthorize your computer​

Plug in your phone to your computer (USB-A to USB-C is best and most compatible, but I think you've mentioned you do not have a cord like this...so use what you can)

*select "Accept" if you revoked the USB authorization​

open a command prompt/powershell (as Administrator or with administrative privileges), and direct it to your platform-tools that you extracted (the r28.0.0 -- if I extracted it in/to my Desktop, I would direct the command prompt to "C:\Users\MyName\Desktop\platform-tools")

enter the command

adb devices

&

fastboot --version

If this returns correctly, it's okay for you to proceed. If not, troubleshooting should start here.

to help me/us, in case all this doesn't work, open Device Manager and please list the instances of your phone and "drivers" -- it may come up as "Pixel 2 XL", "Google Phone", "MTP device", "ADB Interface device", or something along those lines.

enter the command

adb reboot bootloader

If your device reboots, great! and you may proceed. If not, something is wrong or incorrect (may have incorrectly done something) or the cable is acting up where it is not anyone's fault and you should wait for a new cable to continue & fix....

[optional]this would be a great time and place to enter the command

fastboot getvar all

copy its contents, and post it here...

enter the command

flash-all.bat

copy the log, and post it here

depending on what happens, things may work out for you, or you will return here and hopefully post all the "contents" that the commands returned as well as a list of "instances" in Device Manager. With those and what is in your Device Manager, it may explain if it's your drivers, your platform-tools/fastboot set up, or your cord (hence, "process of elimination"). I've personally had it that, because I was using various android devices (from Motorola Droid OG, 3 & 4 to Samsung [S5]), my Pixel was connecting as MTP Device and/or Google Phone when it's supposed to be ADB Interface device (hence adb commands working on it) and only until I changed the driver to that (may be uniquely my solution, but still...). It was very late and has been a while, but I believe how I corrected this when I was having this exact error was by flashing the exact version that was currently on my device and/or wiping, formatting, and manually inputting the correct size that would match the "max-download-size". I think I remember my device not wanting to accept and flash later updates until I did something like that and re-initialized the current version and make it "stable" first. That's why we can find this out through the "contents" you post here and/or from your own memory.

I hope you follow this, get back to me/us, and/or it works out! Good luck!

P.S. If all else fails, I do have an idea on what you might be able to do or flash in TWRP...