This is almost for sure the wrong way to do things, but this is my current process (as of apr 22, 2018) to upgrade my phone when new android releases are out, and/or new elemental x.

UPDATE TO LATEST FULL RELEASE OF ANDROID:

IMPORTANT: REMOVE ‘-w’ from the ‘fastboot update’ line in the flash-all.sh (this will stop it from wiping the device).

  • Make sure you have already downloaded the latest Magisk ZIP (should be under ‘/sdcard/MagiskManager’, ex. ‘Magisk-v15.2.zip’)

  • Power off device

  • unzip the image.zip file

      # unzip image-walleye-opm2.171019.029.b1.zip
    
  • Boot the device into fastboot (power + down)

  • Run flash-all.sh

      # flash-all.sh
    
  • Let phone boot into the OS

  • Power off

  • Boot the device into fastboot (power + down)

  • Then, boot twrp

      # fastboot boot *TWRP.img path*
    
  • put in your password for twrp encryption and let it load into TWRP

  • now push your files to your pixel 2

    # adb push ElementalX-P2-1.05.zip /sdcard/Download
    # adb push Magisk-VERSION.zip /sdcard/Download
    # adb push /latest/release/boot.img /sdcard/Download
    
  • now click install, and install your files. install magisk and elementalx

  • wipe dalvik and cache, then reboot to system

  • open magisk check if rooted

  • if not, then install, patch boot file, pick boot.img and then

    # adb pull /sdcard/MagiskManager/patched_boot.img
    # adb reboot bootloader
    # fastboot flash boot patched_boot.img
    # fastboot reboot
    
  • Reboot the phone

TO UPGRADE ELEMENTAL X:

Perform the same steps as above, but just do the elementalX portion.

If anyone knows a better, quicker, way please let me know cause this is kinda annoying 🙂