How to Upgrade the Google Pixel 2 XL from Oreo to Pie

The Google Pixel 2 is one of the best, pure Android experiences in the cellphone market. Despite being a slightly ‘older’ phone (released in October 2017), the Google Pixel 2 still receives a ton of updates – in fact, the latest factory image for the Pixel 2 was released just this month.

If you’re a rooted user and don’t typically install OTA updates, we are going to show you how to upgrade your Pixel 2 (or Pixel 2 XL) from Android 8.0 Oreo to the latest Android 9.0 Pie factory image. We will also show you how to upgrade to higher versions of Android 9.0 Pie – while it sounds like nearly the same thing, the process differs in a few steps.


Before you begin, you should remove any lock screen security, and also uninstall any Substratum overlays if you have them installed. You do not need to remove any Magisk modules you have installed, they should in fact continue working as normal after following this guide.

TWRP 3.2.3-1 decryption works perfectly fine with fingerprint and PIN security methods.

  1. First download and extract the latest factory image, and place it in your main ADB pathway.
  2. Enable USB debugging on your Pixel 2 by going into Settings > About Phone > tap Build Number 7 times until Developer Mode is activated.
  3. Go to Settings > Developer Options > enable USB Debugging.
  4. Now connect your Pixel 2 to your PC via USB, and launch an ADB terminal.
  5. In the ADB terminal, type: adb devices
  6. You should see a pairing dialogue on your Pixel 2 screen – confirm it. The ADB terminal should then display your Pixel 2’s serial number when you use the adb devices command. If ADB does not display your serial number, or returns messages like “No Devices Attached” or “Device Offline”, try to reseat the USB connection or troubleshoot your USB drivers.
  7. If ADB successfully recognizes your device, you can now fastboot the latest factory image with the -w removed in the flash-all.bat file. You need to fastboot this to both slots (A/B partitions), and allow it to fully boot up each time. Alternatively, you can use the Dueces script (allow the factory image to choose which slot to install to).
  8. Now we need to fastboot into TWRP. Download the TWRP 3.2.3-1.img file and place it in your main ADB folder, then transfer the TWRP_installer to your Pixel 2’s SD card. Also download and transfer the custom kernel to your SD card as well.
  9. In the ADB terminal, type: fastboot twrp
  10. When you’re in TWRP, swipe to allow modifications. Then from the main menu, choose Install > SD Card > TWRP_installer, and swipe to flash it.
  11. After TWRP has been successfully flashed, you should now flash the custom kernel using the same method.
  12. Go ahead and reboot to system, and allow Android to boot up fully.
  13. Now transfer the latest Magisk .zip to your SD card, and reboot your Pixel 2 into TWRP again.
  14. Flash the Magisk .zip via TWRP, and reboot to system once again.

How to Upgrade Pixel 2 from 8x to 9x


  1. First you need to disable any lock screen security on your Pixel 2.
  2. Enable Developer Options (Settings > About > tap Build Number 7 times).
  3. Go to Settings > Developer Options > enable USB Debugging.
  4. Connect your Pixel 2 to your PC via USB, and launch an ADB terminal on your computer.
  5. Make sure the ADB connection is recognized by typing ‘adb devices’ into the ADB terminal.
  6. If your device is successfully recognized, the ADB terminal will display your device’s serial number (you may need to accept a pairing dialogue on your Pixel 2 screen). If it is not recognized, you should try reseating your USB cable, or troubleshooting your USB drivers.
  7. Download the Fastboot 9.0 factory image and place it in your main ADB pathway. Do the same for the TWRP.IMG file.
  8. Download and transfer the,, and Magisk Manager APK to your Pixel 2’s SD card.
  9. Open the flash-all.bat file in something like Notepad, and remove the -w from the code, then save and exit the file. If you want the entire device wiped, you do not need to remove the -w from the BAT file.
  10. Launch an ADB terminal on your PC, and fastboot your Pixel 2 into the TWRP .img using: fastboot boot <twrp file name.img>
  11. When you’re in the TWRP main menu, swipe to allow modifications. Then go to Install > SD Card> TWRP .zip file you transferred earlier, and swipe to flash.
  12. When TWRP has successfully flashed, tap Reboot to Recovery (not Reboot to System!), and flash the Magisk Uninstaller the same way you did the TWRP .zip (this step only necessary if you had Magisk previously installed).
  13. Reboot to Recovery again, and flash the custom kernel. Reboot to Recovery again.
  14. Now you can Reboot to System, and allow Android to go through the optimize process. Just let your phone rest for a few minutes.
  15. Now using a file explorer, locate the Magisk Manager APK on your SD Card, and install it (you may need to enable Unknown Sources in your phone’s settings).
  16. Reboot into TWRP recovery once again, and flash the Reboot to Recovery followed by Reboot to System.

Troubleshooting Advice

If your Pixel 2 gets stuck on the G logo, or you bootloop into TWRP, try:

  • Performing a hard reboot (long pressing the power).
  • Booting into TWRP, and flashing the Magisk Uninstaller a few times (it may take a few flashes to ‘stick’ correctly).
Kamil Anwar
Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.
Back to top button