With the recent update to Android Pie, a lot of us have lost our root access again. The process to re-root is pretty simple if you plan on sticking with Magisk.
You will need:
- Magisk APK installed on your Pixel 2 XL.
- The latest boot.img from the factory image. (I wouldn't trust anything you download unless it's from Google). The boot.img is located in 'taimen-ppr1.180610.009/image-taimen-ppr1.180610.009'. You will have to unzip the ppr1 file as well.
- Remove the security pin for the lock screen if you have one set up.
- Unlock the bootloader.
- Push the boot.img to your internal storage with:
adb push boot.img /sdcard/Download
- Open Magisk and click the install button. Click Install again, and then select the "Patch Boot Image File" and navigate to your boot.img.
- Once this is complete, download the patched_boot.img from your device back to your computer.
adb pull /sdcard/MagiskManager/patched_boot.img
- Reboot your device into the bootloader.
adb reboot bootloader
- Flash the patched boot image
fastboot flash boot patched_boot.img
- Reboot with fastboot (this is the only way I didn't get stuck in a bootloop).