[Google Pixel 2 XL Guides, News, & Discussion] simplepinoi177:
I would do as TonikJDK suggests as it is "cleaner" and greatly eliminates the potential furthur headaches not doing as suggested could cause in the future.

But if you are still interested and insist on "dirty flashing" the OTA, I have successfully done it. It's difficult if you have TWRP as your custom recovery, but if you still have the stock recovery, you simply just have to download the OTA .zip file (around where you find the full factory images on the dev website) to your phone and apply the update from one of the menu selections in the stock recovery -- I'm not certain if you have to uninstall Magisk and/or unroot to successfully do this.

If you don't know how to get to stock recovery options and/or apply the update from a file...

You can either power on the phone holding volume-down button until you're at the bootloader and continue pressing volume button until you can select "Recovery" and press the power button to enter, or run an adb command: adb reboot recovery . Once, in there, you will see a laying down Android with an open chest and a type of warning sign, at this point you simply hold the power button, wait a moment, and then press the volume-up button at the same time. If done successfully, it will show "Android Recovery" in yellow along with some other information and selectable options pop up. From there you'd choose "Apply update from SD card" and select your way to the OTA .zip file you downloaded and loaded to your phone earlier.

I just realized after writing this whole spiel that it could be WAAY simpler and definitely possible that there might not be TWRP installed instead of assuming everyone has the custom recovery installed…:eek::rolleyes::facepalm:

But since I wrote this whole thing already, I might as well just leave this here in case one does want to know how to do this and does have TWRP installed.

*Before anything, you should backup your phone (Nandroid or the type of full backup would be best). And you should know that you will lose root and have to re-root and re-install any custom kernel/recovery/etc. and maybe even xposed or busybox or the like. Also, I'm not certain if you have to un-root and uninstall Magisk to make this work.*

I don't believe there's a way (while running xposed & having bootloader unlocked) to download the OTA using Google/Android's default method (System Update within the System section of the Settings). So you'd have to download it from the developer's website. You will need to download the full factory image

of the version you are currently on.

(Very important not to simply download the newest or topmost full factory image you see, but the version you are on or closest

previous

version to you). Around the same place you find the full factory images, you can download the OTA's (tamien for us, but if not on P2XL, then please be sure to download the correct one for your specific model; i.e. pixel 2 is walleye). After downloading the OTA, put the whole .zip on your phone (can use adb, plug in usb & transfer, I even use Superbeam/Shareit [Wifi direct]) -- tip: please remember where or what folder you put it in. Next, you will need to extract the boot.img and dtbo.img from the full factory image/.zip. If you look inside the full-factory-image.zip, you will find another .zip file in there (there would be only 1 .zip within). If you look inside

that

zip, you will find a bunch of image files (*.img) and there you'd find the boot.img and dtbo.img files. Depending on what software you use (I personally use WinRAR, but there are 7z and WinZip and many more), you can simply extract those two; in any case, get those two files and put it in the same folder as your adb.exe and fastboot.exe platform-tools folder. After all that, all you have to do now is load into bootloader, flash the two images (essentially returning stock recovery), and reboot into recovery. NOTE: doing this will

NOT

make your phone bootable into the OS; even though you put stock boot and dtbo images back onto the phone, something still will keep it from loading the OS and it will either bootloop or infinitely load under the G symbol. Instead of TWRP, it should now be the stock Android Recovery, and you can now select "Apply update from SD card" and direct your way to the OTA .zip file you downloaded and loaded to your phone earlier. After updating, you reboot regularly. It may get stuck loading unendingly under the G symbol and you would have to hard restart or hard power-off; but any subsequent boots you should be able to successfully load into your phone (the OTA update repairs whatever is broken outside of the boot.img and dtbo.img partitions). It should say "Finishing update" or something like that. When done, you are free to re-root and feel free to install custom kernel/recovery as you see fit.

TL;DR

optional: make full backup (nandroid would be best)

Download full factory image on your current version or closest previous version to that of your current one

Download OTA .zip file

Put OTA .zip file on phone

Extract boot.img & dtbo.img files from full factory image .zip (see detailed directions if you don't understand)

Place boot.img & dtbo.img in same folder of adb.exe and fastboot.exe (most likely in folder named some iteration of platform-tools)

Reboot into bootloader (run command: adb reboot bootloader)

Run command: fastboot flash boot boot.img

Run command: fastboot flash dtbo dtbo.img

Boot into recovery (run command: fastboot boot recovery)

Reveal menu selections and select "Apply update from SD card" (If you don't know how, click on the 1st "Show Content" button above)

After update process, reboot

NOTE: first boot may freeze, bootloop, or infinite loading under G symbol; hard reset or hard power-off. Try again. It should boot successfully every time after.

optional: install custom kernel/recovery/etc.

Re-root