Step 9 – Now go into Fastboot/Bootloader Mode on Pixel XL. How? Press Volume Up + Volume Down + Power keys for a few seconds till you see some text on the screen. This is Bootloader Mode.
Step 10 – Navigate to the same directory now as where you have Fastboot (i.e. Step 1) and on Windows: Open Command Prompt (Shift + Right-click > Open Command Prompt). For Mac OS X and Linux, use Terminal to navigate to this directory.
Step 11 – Type in the following command and press Enter.
fastboot boot twrp-3.2.1-0-marlin.img
Step 12 – Once you enter the command, the phone will boot into TWRP. Now use the “Install” option to flash the “twrp-pixel-installer-marlin-3.2.0-0.zip” zip file. This will ensure your TWRP doesn’t get reset to stock on reboot.
Step 13 – Use the Install option again. Now using your volume keys, navigate to Magisk-v15.2.zip and select it using the Power button. Confirm the installation on the next screen and the installation procedure should start now.
Step 14 – After the installation completes, go to “+++++Go Back” and reboot the phone by selecting “reboot system now” from the Recovery menu. The phone will boot now and it might take about 5 minutes to boot on your first time. So, please wait.
That’s it! Your Pixel XL is now rooted on Android 8.1 Oreo firmware on your phone! Check for the SuperSU app in your apps list to verify.
To make sure you have correctly installed the above root method and it’s working, verify with Root Checker as given in the link.
Have fun playing with it! If you have any issues, please fire them up in the comments below!