• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[GUIDE] Unlock/Flash/Root for the Pixel 2 (walleye)

Search This thread

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,751
49,974
26
Mesa, AZ
nathanchance.dev
Introduction

Hello everyone, this is a guide to assist you with customizing your Pixel 2! I will be going over installing fastboot and adb, unlocking your bootloader, how to flash the factory images for clean flashes and upgrades, and how to root. Please feel free to ask any questions if you need clarification. Enjoy!

This information has been distilled from Google's official factory image site and the Magisk thread.


Installing fastboot and adb

Thankfully, Google has provided just adb, fastboot, and systrace as a simple zip file, making this process super easy. You MUST be on at LEAST 26.0.2 for the commands in this guide to work. When in doubt, grab the latest copy and install them using the following instructions.


Windows:

  1. Unzip the folder somewhere on your hard drive.
  2. Go to the folder containing the adb and fastboot files and type "cmd" in the path bar at the top.
  3. A command prompt should open with the current folder showing on the prompt.
  4. Type the following commands:
    Code:
    adb --version
    fastboot --version
    You should see some information appear. If that is the case, you were successful!

Mac/Linux:

  1. Unzip the folder somewhere on your hard drive.
  2. Navigate to that folder with your terminal.
  3. Run the following commands:
    Code:
    sudo install adb dmtracedump e2fsdroid etc1tool fastboot hprof-conv make_f2fs mke2fs mke2fs.conf sload_f2fs sqlite3 /usr/local/bin
    sudo mkdir -p /usr/local/lib64
    sudo install lib64/libc++.so /usr/local/lib64
  4. Type the following commands:
    Code:
    adb --version
    fastboot --version
    You should see the version information, along with telling you they are installed to /usr/local/bin. If so, you were successful!


Unlocking the bootloader

WARNING: This WILL wipe your entire phone. Please make copies or backups of any important data. This can also go wrong rendering your device inoperable. Proceed with caution.

  1. On your phone, open Settings, navigate to "System" then "About phone", and tap on the build number 7 times.
  2. Go one menu up, click on "Developer options", and turn on USB debugging and OEM unlocking.
  3. In your terminal, type the following command:
    Code:
    adb reboot bootloader
  4. Run the following command:
    Code:
    fastboot flashing unlock
  5. Follow the prompts on your device then reboot!


Flashing factory images

NOTE #1: You CANNOT downgrade factory images. Google has prevented users from doing so to keep them safe from vulernabilities that were patched. You should only upgrade or reinstall the current image.

NOTE #2: If you have mounted /system as rw at any point (like in TWRP), you must upgrade using the factory image method. OTAs will fail because they cannot verify the integrity of the disk since its verity data has been changed.

NOTE #3: Flashing the factory images requires an unlocked bootloader. Flashing the OTA zips does not (but if anything goes wrong, you may not be able to recover without an RMA).

Updating to a new release (factory image):

  1. Download the latest factory image from Google's website.
  2. Reboot into the bootloader:
    Code:
    adb reboot bootloader
  3. Unzip the factory image.
  4. Inside you will see a bootloader image, a radio image, an image zip file, and a couple of flash scripts.
  5. If you are on Windows, open the "flash-all.bat" file in a text editor. If you are on Mac or Linux, open the "flash-all.sh" instead.
  6. Remove the "-w" flag before the fastboot command towards the end of the file. This will prevent fastboot from formatting your device.
  7. Run the flash all script! Open a command prompt, navigate to the folder with the script, and run one of the following commands:
    Windows:
    Code:
    flash-all
    Mac/Linux:
    Code:
    ./flash-all.sh
  8. Reboot once it is finished!
Updating to a new release (OTA zip):

  1. Download the latest OTA zip from Google's website
  2. Reboot into recovery:
    Code:
    adb reboot recovery
  3. Hold down the power button and push volume up
  4. Select "Apply update from ADB"
  5. Run the following command from the folder containing the OTA zip:
    Code:
    adb sideload <zip_name>.zip
  6. Reboot once it is finished!
Clean flashing a factory image (wipe everything):

  1. Download the latest factory image from Google's website
  2. Reboot into the bootloader:
    Code:
    adb reboot bootloader
  3. Unzip the factory image.
  4. Run the flash all script! Open a command prompt, navigate to the folder with the script, and run one of the following commands:
    Windows:
    Code:
    flash-all
    Mac/Linux:
    Code:
    ./flash-all.sh
  5. Reboot once it is finished!


Rooting with Magisk

NOTE #4: This section assumes you are not going to install TWRP. If you are, skip to the next section and just flash the latest Magisk zip after installing TWRP.

  1. Download the Magisk zip from the official thread and install the manager from the zip.
  2. Grab a boot image to patch (either the one from the latest factory image or a custom kernel one) and push it to your device:
    Code:
    adb push <path_to_file> /sdcard/Download
  3. Open Magisk Manager and click the Install button.
  4. Click "Install" at the first prompt then choose "Patch Boot Image File". A file manager will pop up.
  5. Select the boot image you want to patch and let Magisk Manager patch it.
  6. Pull it off your device:
    Code:
    adb pull /sdcard/MagiskManager/patched_boot.img
  7. Reboot into the bootloader:
    Code:
    adb reboot bootloader
  8. Flash the boot image and reboot.
    Code:
    fastboot flash boot patched_boot.img
    fastboot reboot
  9. Open Magisk Manager and you should be rooted!


Installing TWRP

NOTE #5: If you just want to temporarily boot TWRP to flash Magisk and your custom kernel, you can just skip flashing the installer zip in this process.

NOTE #6: TWRP can be unstable at times given the way that security has been set up on this device (lack of decryption, failing to boot, etc).

  • Download both the TWRP image and zip installer from the official site.
  • Temporarily boot the TWRP image.
    Code:
    fastboot boot <path_to_twrp_image>
  • Flash the TWRP installer zip.
  • Reinstall Magisk and your custom kernel if you had them.
  • Reboot and profit!


Common issues

  • Outdated fastboot/adb: This device requires the latest fastboot and adb binaries to work properly. A lot of common quick adb/fastboot installation guides link to installers that are old. Please manually install the latest using the information at the beginning of the thread!
  • Using a USB-3.0 or USB-C port: Some newer USB ports do not work with fastboot. Issues manifest as weird errors during a flash. Use a different USB cable/port.


Closing statements

If there are any procedures you would like to see added (like flashing a custom kernel or booting TWRP), I am happy to add them if requested. Also, when requesting help, please be as specific as possible where you get confused. I want this guide to be clear as possible.
 
Last edited:

Xxnoobkiller420xX

New member
Sep 21, 2017
4
0
Stuck on this step

Run the flash all script! Open a command prompt, navigate to the folder with the script, and run one of the following commands:

How do I navigate in command prompt? When I typed flash-all, it said it is not a internal command etc. When I dragged and dropped flash-all into the command prompt, it said C:\Users\W Balls\Downloads\SAMPWND_SYSTEMROOT_ADB_FILES>"C:\Users\****** Jim\Downloads\walleye-opd1.170816.025-factory-4752baae\walleye-opd1.170816.025\flash-all.bat"
error: cannot load 'bootloader-walleye-mw8998-002.0059.00.img'
rebooting into bootloader...
OKAY [ 0.004s]
finished. total time: 0.004s
error: cannot load 'radio-walleye-g8998-00122-1708311414.img'
rebooting into bootloader...
OKAY [ 0.010s]
finished. total time: 0.015s
W/ ( 6448): Unable to open 'image-walleye-opd1.170816.025.zip': No such file or directory
error: failed to open zip file 'image-walleye-opd1.170816.025.zip': I/O Error
Press any key to exit...
 

drmason

Senior Member
Sep 23, 2010
78
10
You are calling the flash-all.bat out of a differende directory (C:\Users\W Balls\Downloads\SAMPWND_SYSTEMROOT_ADB_FILES) therefore it can't find the system image files since they are located under C:\U sers\****** Jim\Downloads\walleye-opd1.170816.025-factory-4752baae\walleye-opd1.170816.025. Make sure you extract your image to that directory, open up a command promt and navigate to it with "cd C:\Users\W Balls\Downloads\SAMPWND_SYSTEMROOT_ADB_FILES" and call the flash-all.bat from there.

Check out this for basic command line stuff https://www.digitalcitizen.life/command-prompt-how-use-basic-commands

---------- Post added at 10:58 AM ---------- Previous post was at 10:56 AM ----------

I tried this and it seems the magisk manager isn't able to download magisk on its own at least on my device:

Code:
DownloadManager: [356] Stop requested with status HTTP_DATA_ERROR: Unable to resolve host "forum.xda-developers.com": No address associated with hostname
DownloadManager: [356] Finished with status WAITING_TO_RETRY

EDIT: Seems like DNS66 was blocking the download patching was scucessfull now.

This is weird, can't I make 2 posts in a row??
 
Last edited:
  • Like
Reactions: Schedonnardus

530farm

Senior Member
Aug 3, 2012
614
149
Oakland
Anybody figure out a solution for flashing when on MacOs High Sierra? Platform tools 26.0 1 was a fix for high Sierra, yet 26.0.2 seemed to have lost that commit, so fastboot doesn't work at all. Wondering if it's safe to use 26.0.1 on the pixel 2
 

JayBlack_686

Member
Nov 23, 2012
49
6
Dallas
Flashing factory images
First, thanks for putting this together. I've rooted using your method.

Regarding OTA updates: I've read that if we've rooted, we will need to un-root before we can receive an OTA update. Is this always true, or only if we've installed a custom recovery like TWRP? It would be really handy to have a guide on how to un-root, update, then re-root.

Related - let's say that for whatever reason, we have to flash an OTA update manually, rather than actually getting it OTA. Do we lose root by doing so?

Thanks!
 

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,751
49,974
26
Mesa, AZ
nathanchance.dev
First, thanks for putting this together. I've rooted using your method.

Regarding OTA updates: I've read that if we've rooted, we will need to un-root before we can receive an OTA update. Is this always true, or only if we've installed a custom recovery like TWRP? It would be really handy to have a guide on how to un-root, update, then re-root.

Related - let's say that for whatever reason, we have to flash an OTA update manually, rather than actually getting it OTA. Do we lose root by doing so?

Thanks!

Magisk's OTA section should clear up some of your doubts: https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md#ota-installation-tips
 

JayBlack_686

Member
Nov 23, 2012
49
6
Dallas
Last edited:

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,751
49,974
26
Mesa, AZ
nathanchance.dev
Looks really straightforward, thank you! Might be cool to point to it in the OP. I bet I'm not the only one who was only vaguely aware of the impact that rooting has on how we get OTAs. Then again, maybe everyone else wants to run custom ROMs.

Good point, I'll add it here in a bit :)

Sent from my Pixel 2 XL using XDA Labs
 

tango650

Member
Nov 9, 2017
6
3
OTA vs factory image

Howdy,
really appreciate @nathanchance for putting this together. Would you mind adding a few lines about the differences between OTA and factory images. As a layman i haven't got the foggiest idea which route to go and would appreciate some wisdom. Thanks!
 
  • Like
Reactions: UpGrad3

UpGrad3

Senior Member
Jul 31, 2009
351
31
Thank you so much for this guide but can anybody please explain how you can tell which image to patch ?
I am unable to get this to work magisk is showing this message: stock kernel cannot be patched please use a custom kernel
i downloaded: walleye-opd1.170816.010-factory-63083164.zip
unsure as to whether this is correct for my phone as they are quite a few and its unclear how to tell
i have a pixel 2 from the UK that was factory unlocked and i unlocked the boot loader
what am i doing wrong please help
 

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,751
49,974
26
Mesa, AZ
nathanchance.dev
Howdy,
really appreciate @nathanchance for putting this together. Would you mind adding a few lines about the differences between OTA and factory images. As a layman i haven't got the foggiest idea which route to go and would appreciate some wisdom. Thanks!

The primary difference is that the OTA can be flashed on an unlocked bootloader and is designed not to wipe your phone.

Thank you so much for this guide but can anybody please explain how you can tell which image to patch ?
I am unable to get this to work magisk is showing this message: stock kernel cannot be patched please use a custom kernel
i downloaded: walleye-opd1.170816.010-factory-63083164.zip
unsure as to whether this is correct for my phone as they are quite a few and its unclear how to tell
i have a pixel 2 from the UK that was factory unlocked and i unlocked the boot loader
what am i doing wrong please help

Are you supplying the boot image to Magisk? Show me a screenshot of what Magisk says when it tries to patch.
 

fjm568

Member
Feb 5, 2012
44
9
Thanks @nathanchance for this. I'm not a technical person, but can follow directions. This is the 4th phone that I've rooted following directions of some very smart and talented people here on XDA. I don't do this kind of thing everyday, and am not up on programming or coding or whatever you guys call it now days.

All I ended up doing is taking the OTA from Google to the .025. Then followed the Magisk rooting instructions to get root. I had Unlocked it the first day I turned the phone on, I haven't put my SIM in yet, but will play around with it a little more, and finish setting it up,

Again, thanks for the GUIDE to this Pixel 2 phone.
 
  • Like
Reactions: nathanchance

UpGrad3

Senior Member
Jul 31, 2009
351
31
The primary difference is that the OTA can be flashed on an unlocked bootloader and is designed not to wipe your phone.



Are you supplying the boot image to Magisk? Show me a screenshot of what Magisk says when it tries to patch.

That is what i get. I have even flashed the whole factory image to the phone and still get this
 

Attachments

  • LVUIAUX.png
    LVUIAUX.png
    75.8 KB · Views: 887
Last edited:

drmason

Senior Member
Sep 23, 2010
78
10
@UpGrad3 you need to extract the boot.img out of your zip (walleye-opd1.170816.010-factory-63083164.zip) file and process this one, I'll guess you tried with the whole zip?? Also you can "attach" pictures to the post and not include the full res with the image tags...
 

UpGrad3

Senior Member
Jul 31, 2009
351
31
@drmason I did extract the img from the zip. I followed the instructions exactly which is why im so confused as to what is going on ? Ok sorry i will do in future.
Amended post
 
Last edited:

JayBlack_686

Member
Nov 23, 2012
49
6
Dallas
@drmason I did extract the img from the zip. I followed the instructions exactly which is why im so confused as to what is going on ? Ok sorry i will do in future.
Amended post
You got the boot.img from the zip file that was inside the zip file?

from https://forum.xda-developers.com/showpost.php?p=74429474&postcount=90

Step by step

1. Download and extract factory image. Mine was taimen-opd1.170816.010-factory-c796ddb4.zip
***2. Once extracted go into the folder and extract image-taimen-opd1.170816.010.zip.
There you will find the boot.img.

---------- Post added at 08:36 AM ---------- Previous post was at 08:27 AM ----------

Good point, I'll add it here in a bit :)

Sent from my Pixel 2 XL using XDA Labs

@nathanchance, one more suggestion for the OP: at one point I was looking at using the stock boot img and couldn't figure out how to get it. Later, I found the below post, where the first two steps are essentially "open the zip inside the zip for the boot.img" to extract the stock boot image. Maybe it's really obvious, but I didn't get it.

https://forum.xda-developers.com/showpost.php?p=74429474&postcount=90
 
Last edited:

UpGrad3

Senior Member
Jul 31, 2009
351
31
You got the boot.img from the zip file that was inside the zip file?

from https://forum.xda-developers.com/showpost.php?p=74429474&postcount=90

Step by step

1. Download and extract factory image. Mine was taimen-opd1.170816.010-factory-c796ddb4.zip
***2. Once extracted go into the folder and extract image-taimen-opd1.170816.010.zip.
There you will find the boot.img.

---------- Post added at 08:36 AM ---------- Previous post was at 08:27 AM ----------
this is where i was going wrong i was using a file that had bootloader in the name rather than going into the second zip and finding boot


@nathanchance, one more suggestion for the OP: at one point I was looking at using the stock boot img and couldn't figure out how to get it. Later, I found the below post, where the first two steps are essentially "open the zip inside the zip for the boot.img" to extract the stock boot image. Maybe it's really obvious, but I didn't get it.

https://forum.xda-developers.com/showpost.php?p=74429474&postcount=90

@UpGrad3 you are using the latest Magisk Manager 5.4.1 for this?
yes i was

although im now stuck on the bootscreen with the G any suggestions ?

Fixed.
incase it happens to anyone else. i restored the factory image again then started the root procedure. im now rooted and fully working
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 72
    Introduction

    Hello everyone, this is a guide to assist you with customizing your Pixel 2! I will be going over installing fastboot and adb, unlocking your bootloader, how to flash the factory images for clean flashes and upgrades, and how to root. Please feel free to ask any questions if you need clarification. Enjoy!

    This information has been distilled from Google's official factory image site and the Magisk thread.


    Installing fastboot and adb

    Thankfully, Google has provided just adb, fastboot, and systrace as a simple zip file, making this process super easy. You MUST be on at LEAST 26.0.2 for the commands in this guide to work. When in doubt, grab the latest copy and install them using the following instructions.


    Windows:

    1. Unzip the folder somewhere on your hard drive.
    2. Go to the folder containing the adb and fastboot files and type "cmd" in the path bar at the top.
    3. A command prompt should open with the current folder showing on the prompt.
    4. Type the following commands:
      Code:
      adb --version
      fastboot --version
      You should see some information appear. If that is the case, you were successful!

    Mac/Linux:

    1. Unzip the folder somewhere on your hard drive.
    2. Navigate to that folder with your terminal.
    3. Run the following commands:
      Code:
      sudo install adb dmtracedump e2fsdroid etc1tool fastboot hprof-conv make_f2fs mke2fs mke2fs.conf sload_f2fs sqlite3 /usr/local/bin
      sudo mkdir -p /usr/local/lib64
      sudo install lib64/libc++.so /usr/local/lib64
    4. Type the following commands:
      Code:
      adb --version
      fastboot --version
      You should see the version information, along with telling you they are installed to /usr/local/bin. If so, you were successful!


    Unlocking the bootloader

    WARNING: This WILL wipe your entire phone. Please make copies or backups of any important data. This can also go wrong rendering your device inoperable. Proceed with caution.

    1. On your phone, open Settings, navigate to "System" then "About phone", and tap on the build number 7 times.
    2. Go one menu up, click on "Developer options", and turn on USB debugging and OEM unlocking.
    3. In your terminal, type the following command:
      Code:
      adb reboot bootloader
    4. Run the following command:
      Code:
      fastboot flashing unlock
    5. Follow the prompts on your device then reboot!


    Flashing factory images

    NOTE #1: You CANNOT downgrade factory images. Google has prevented users from doing so to keep them safe from vulernabilities that were patched. You should only upgrade or reinstall the current image.

    NOTE #2: If you have mounted /system as rw at any point (like in TWRP), you must upgrade using the factory image method. OTAs will fail because they cannot verify the integrity of the disk since its verity data has been changed.

    NOTE #3: Flashing the factory images requires an unlocked bootloader. Flashing the OTA zips does not (but if anything goes wrong, you may not be able to recover without an RMA).

    Updating to a new release (factory image):

    1. Download the latest factory image from Google's website.
    2. Reboot into the bootloader:
      Code:
      adb reboot bootloader
    3. Unzip the factory image.
    4. Inside you will see a bootloader image, a radio image, an image zip file, and a couple of flash scripts.
    5. If you are on Windows, open the "flash-all.bat" file in a text editor. If you are on Mac or Linux, open the "flash-all.sh" instead.
    6. Remove the "-w" flag before the fastboot command towards the end of the file. This will prevent fastboot from formatting your device.
    7. Run the flash all script! Open a command prompt, navigate to the folder with the script, and run one of the following commands:
      Windows:
      Code:
      flash-all
      Mac/Linux:
      Code:
      ./flash-all.sh
    8. Reboot once it is finished!
    Updating to a new release (OTA zip):

    1. Download the latest OTA zip from Google's website
    2. Reboot into recovery:
      Code:
      adb reboot recovery
    3. Hold down the power button and push volume up
    4. Select "Apply update from ADB"
    5. Run the following command from the folder containing the OTA zip:
      Code:
      adb sideload <zip_name>.zip
    6. Reboot once it is finished!
    Clean flashing a factory image (wipe everything):

    1. Download the latest factory image from Google's website
    2. Reboot into the bootloader:
      Code:
      adb reboot bootloader
    3. Unzip the factory image.
    4. Run the flash all script! Open a command prompt, navigate to the folder with the script, and run one of the following commands:
      Windows:
      Code:
      flash-all
      Mac/Linux:
      Code:
      ./flash-all.sh
    5. Reboot once it is finished!


    Rooting with Magisk

    NOTE #4: This section assumes you are not going to install TWRP. If you are, skip to the next section and just flash the latest Magisk zip after installing TWRP.

    1. Download the Magisk zip from the official thread and install the manager from the zip.
    2. Grab a boot image to patch (either the one from the latest factory image or a custom kernel one) and push it to your device:
      Code:
      adb push <path_to_file> /sdcard/Download
    3. Open Magisk Manager and click the Install button.
    4. Click "Install" at the first prompt then choose "Patch Boot Image File". A file manager will pop up.
    5. Select the boot image you want to patch and let Magisk Manager patch it.
    6. Pull it off your device:
      Code:
      adb pull /sdcard/MagiskManager/patched_boot.img
    7. Reboot into the bootloader:
      Code:
      adb reboot bootloader
    8. Flash the boot image and reboot.
      Code:
      fastboot flash boot patched_boot.img
      fastboot reboot
    9. Open Magisk Manager and you should be rooted!


    Installing TWRP

    NOTE #5: If you just want to temporarily boot TWRP to flash Magisk and your custom kernel, you can just skip flashing the installer zip in this process.

    NOTE #6: TWRP can be unstable at times given the way that security has been set up on this device (lack of decryption, failing to boot, etc).

    • Download both the TWRP image and zip installer from the official site.
    • Temporarily boot the TWRP image.
      Code:
      fastboot boot <path_to_twrp_image>
    • Flash the TWRP installer zip.
    • Reinstall Magisk and your custom kernel if you had them.
    • Reboot and profit!


    Common issues

    • Outdated fastboot/adb: This device requires the latest fastboot and adb binaries to work properly. A lot of common quick adb/fastboot installation guides link to installers that are old. Please manually install the latest using the information at the beginning of the thread!
    • Using a USB-3.0 or USB-C port: Some newer USB ports do not work with fastboot. Issues manifest as weird errors during a flash. Use a different USB cable/port.


    Closing statements

    If there are any procedures you would like to see added (like flashing a custom kernel or booting TWRP), I am happy to add them if requested. Also, when requesting help, please be as specific as possible where you get confused. I want this guide to be clear as possible.
    6
    Okay, I'm using the Pixel 2 and was fighting with this dang thing for a while before I got it fixed. Your guide really helped to get me on a great starting point. One suggestion to add in order to get the Pixel 2 to work properly, you MUST go into the settings of Magisk Manager and change the Update Channel to Beta. That will make the Magisk Manager (v 4.5.2) use Magisk 14.5 instead of 14.0. 14.0 will NOT work to patch the boot.img. Magisk 14.5 worked perfectly.

    Again, thank you SO much for your post.
    5
    First, thanks for putting this together. I've rooted using your method.

    Regarding OTA updates: I've read that if we've rooted, we will need to un-root before we can receive an OTA update. Is this always true, or only if we've installed a custom recovery like TWRP? It would be really handy to have a guide on how to un-root, update, then re-root.

    Related - let's say that for whatever reason, we have to flash an OTA update manually, rather than actually getting it OTA. Do we lose root by doing so?

    Thanks!

    Magisk's OTA section should clear up some of your doubts: https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md#ota-installation-tips
    4
    I haven't tried it yet, but the latest version of Magisk is 18.0. The link in the OP of this thread to the Magisk beta is way out of date. That thread has been closed for a long time. The beta and stable versions are now both listed in the main Magisk thread:

    https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

    Nathan, you really should update the OP, because it's leading people to the wrong place for Magisk.

    *

    Also this might be helpful. You may need to first use the Magisk uninstaller, before installing the new Magisk:

    https://forum.xda-developers.com/showpost.php?p=78382246&postcount=29484

    *

    [Edit: I went ahead and tried the update. First I temporarily booted into TWRP and flashed the latest Magisk uninstaller, from the main Magisk thread that I link to above. Then I booted back into the bootloader and flashed the factory image (not the OTA). Then I let the system reboot (which it does automatically after flashing the factory image). Finally I temporarily booted into TWRP again and flashed the Magisk v18.0 zip to install Magisk. Everything seems to be working okay.

    From reading around, I think the step of letting the phone reboot into the system, after flashing the new factory image (and before flashing Magisk), may be important. When the phone reboots, it switches to the other boot partition. If it hasn't done this, then when you flash Magisk, you may be flashing it to the wrong boot partition, hence it will have no affect on the system you're actually booting into. In TWRP, I think, you can select which slot to flash Magisk to, but then you have to be sure what you are doing. Rebooting first may be the simpler and more foolproof solution.]
    4
    Hi, when you say: updated to December update via OTA
    Is this following the instructions on Google's page: adb sideload ota_file.zip

    When you say: Pulled December update boot.img
    Are you grabbing the boot.img from the December full factory image?

    Also, before you do the sideload, are you using Magisk Manager to "un-root?"

    Would you consider posting your command line instructions for the above steps? Thanks!

    After typing all this up, I realized it's very long. I apologize if it's too long, I just don't want someone to take my info and brick their phone.

    This is exactly how I got the December update on my phones.
    I did not "unroot" before I performed this. I did this twice on both of my Pixel 2 phones successfully.
    I'm on Magisk 5.4.3 and V14.5 (under settings you can select Update Channel: Beta)
    I do not have TWRP since it's still Beta
    I'm using a Windows 10 computer

    1) Ensure you have the most up to date SDK Platform Tools and current drivers
    2) Optional Insert the SDK Platform Tools zip contents into a folder like: "C:\Android\platform-tools"
    3) Optional Right click on your desktop, select new shortcut, paste "C:\Windows\System32\cmd.exe" into the path bar, name it "cmd" (This creates a shortcut to a cmd prompt on your desktop)
    4) Create a folder on your desktop titled "Pixel 2" (or something similar)
    5) Download 8.1.0 (OPM1.171019.011, Dec 2017) from here: Full OTA Images for Nexus and Pixel Devices. Move from downloads to created file folder "Pixel 2. ZIP will be titled "Pixel 2.walleye-ota-opm1.171019.011-xxxxxxxx"
    6) Download 8.1.0 (OPM1.171019.011, Dec 2017) from here: Factory Images for Nexus and Pixel Devices. Move from downloads to created file folder "Pixel 2. ZIP will be titled "walleye-opm1.171019.011-factory-xxxxxxxx"
    7) Extract the Factory image into your Pixel 2 folder
    8) Drill down into the folders to find a zip named image-walleye-opm1.171019.011
    9) Double click the zip to open the contents and find boot (you might have to extract this zip as well)
    10) Copy this image to your Pixel 2 folder for future use and place on your phone into the Download folder
    11) With your phone plugged into an USB-A to USB-C cable (I have read USB-C to USB-C don't like to work, also USB 2.0 not USB 3.0 on your computer), fire up your cmd short cut
    12) Once loaded comand: adb devices > You should see your device serial number
    13) Command : adb reboot recovery
    14) Once the recovery loads you will see an "Android logo with red exclamation mark"
    15) Hold power and press volume up once, you will see a menu. With your volume down button go to Apply update from ADB, press the power button
    16) In your Pixel 2 folder, go to the OTA zip "walleye-ota-opm1.171019.011". On the top menu you should see "copy path" or alternatively you can right click > properties > Location. Copy that string (IE "C:\Users\you\desktop\...")
    17) command: adb sideload and *Ctrl +v* to paste or you must type out the "adb sideload C:\Users\you\desktop\..."
    18) The phone and computer will do their thing, your command window will give you a progress percentage 0-100% twice
    19) Once complete, on the phone the Reboot system now should already be highlighted, press the power button to select

    You should then be on 8.1 with the December updates after the phone restarts.

    20) Once phone is booted, go into Magisk and select install, Patch Boot Image File, this will take you to the phone's download folder and select the boot image
    21) Let Magisk do it's thing, once it's done you will get a notification that the patched_boot.img is stored in your phone's /sdcard/MagiskManager/ folder
    22) Copy patched_boot.img off your phone to your Pixel 2 folder on your computer.
    23) From your cmd shortcut, comand: adb devices > You should see your device serial number
    24) Command: adb reboot bootloader > phone will reboot into bootloader
    25) In your Pixel 2 folder, go to the patched_boot.img. On the top menu you should see "copy path" or alternatively you can right click > properties > Location. Copy that string (IE "C:\Users\you\desktop\...")
    26) Command: fastboot flash boot and *Ctrl +v* to paste or you must type out the "fastboot flash boot C:\Users\you\desktop\Pixel 2\patched_boot.img"
    27) It will not take very long, and then command: fastboot reboot
    28) On the reboot, Magisk will give you a message "DTBO has been modified and needs to reboot." > Reboot
    29) On the reboot you will get a message "There's an internal problem with your device. Contact your manufacturer for details". Look here for info: [Tut]Fix DTBO message "There's an internal problem with your device. The message doesn't harm anything.

    You will now have Root via Magisk and pass Safetynet