[Guide] Pixel XL Android 8.1 (OREO) Unlock/Root/Install Images/Kernels/Recovery +

Search This thread

Homeboy76

Senior Member
  • Aug 24, 2012
    2,533
    1,229
    [Guide] Pixel XL Android 8.1.0 (OREO) Unlock/Lock Bootloader + Install Stock Images/Custom kernels/TWRP Recovery/Systemless ROOT + July 2018 Security Patch

    Intro
    • This Guide is for Pixel XL owners that want to Root their phone, and enjoy the benefits of rooting it without installing a Custom ROM. However, for those that just can't live without a Custom ROM, take a look at 'Custom ROMs for Pixel XL'.
    • This Guide also works for the Pixel owners: If, they download the correct files for their phone.
    • This Guide is not for use with the Second Generation Pixel 2 or Pixel 2 XL devices.

    Update(s):
    • Custom ROM - crDroid v4.7
    • Note: Some Custom ROM's have the latest Security Patch.
    • Install Custom Kernel: - See #7, or #8

    Disclaimers:
    • I assume no responsibility for the malfunctioning/bricking of your phone.
    • The order of listed items i.e., Custom Kernels, Custom ROMS, etc. Does not indicate my preference for them. It is your responsibility to do the research before selecting an item.

    Prerequisites

    Other

    Credits/Thanks/Recognitions
    • Heisenberg RETIRED FORUM MODERATOR - He set the standard for creating, detailed, Guides.
    • Those I may have, inadvertently, forgotten.

    Index
    1. Open a Command Prompt/Boot Bootloader/Boot Recovery

      • Open Command Prompt on Computer
        • Option 1 - Open File Explorer, click the platform-tools folder, press shift, right click, and select open command prompt here.
        • Option 2 - Open File Explorer, click the platform-tools folder, highlight the directory information in the address bar or click the folder (left side of address bar) to highlight it type cmd and press enter.
        • Note: If your computer only has 'open powershell here' in the context menu. Use option 2.
      • Boot Bootloader:
        • Power off phone, press and hold the power and volume down buttons until you see Start.
      • Boot Recovery
        • Power off phone, press and hold the power and volume down buttons until you see Start. Use volume up/down button until you see Recovery mode. Press power button.
    2. Test ADB (Android Debug Bridge)/fastboot

      • ADB
        1. Enable USB Debugging - Tap Settings > System > About Phone > Developer Options. Enable USB Debugging.
        2. Open a Command Prompt on your computer.
        3. Type this at the prompt to test ADB.
          Code:
          adb version
          It should return a version number for ADB.
          Note: If it does not return a version number type
          Code:
          adb reboot bootloader
          and try
          Code:
          adb devices
          again.
      • fastboot
        1. Enable USB Debugging - Tap Settings > System > About Phone > Developer Options. Enable USB Debugging.
        2. Open a Command Prompt on your computer.
        3. Boot Bootloader
        4. Connect the phone to the Computer with USB cord.
        5. Type this at the prompt and press enter to test fastboot.
          Code:
          fastboot devices
          It should return your device serial number.
          Note: If it does not return a version number type
          Code:
          adb reboot bootloader
          and try
          Code:
          fastboot devices
          again.
    3. Unlock Bootloader/Return Phone to Stock/Lock Bootloader

      • Unlock Bootloader

        1. Backup your data and Internal storage
        2. Activate Developer Options: Tap Settings > System > About Phone > Tap Build Number until you see you're a Developer. Tap back > Developer Options. Enable OEM Unlock and, USB Debugging.
        3. Boot Bootloader
        4. Connect the phone to the Computer with USB cord.
        5. Open a Command Prompt on your computer and type
          Code:
          fastboot flashing unlock
          and press enter.
          This will erase all user data from the device!
        6. You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
        7. Allow the process to complete and then type
          Code:
          fastboot reboot
          at the Command Prompt and press enter.
        8. When your phone reboots disconnect your usb cable.
          Note: After unlocking your bootloader, you'll see a warning: Your device software can't be checked for corruption. Please lock the bootloader. You will see this warning until, you relock the bootloader.

          Important: Do not relock your bootloader until you have returned the device to Stock..
      • Return Phone to Stock

        1. Backup your data and Internal storage
        2. Download the latest Factory Image
        3. Extract factory Image to the platform-tools folder, or the folder that has fastboot in it.
        4. Verify -w is present in flash-all.bat. Example: fastboot -w update image-marlin-aaa9.999999.999.zip
          Note: This will erase all your Data and Internal Storage
        5. Boot bootloader
        6. Connect your phone to your Computer with a USB cable.
        7. Open a Command Prompt:
        8. Flash the Stock Factory Image on Both Slots
          • Type this at the Command Prompt:
            Code:
            flash-all
          • Let the phone boot.
          • Boot bootloader
          • Open Command Prompt:
          • Switch to the other slot.
          • Type this at the Command Prompt:
            Code:
            fastboot --set-active=other
          • Then type this at the Command Prompt:
            Code:
            flash-all
          • Let the phone boot.
      • Lock Bootloader

        • 'B' must be completed before performing this step!
        1. Boot bootloader
        2. Open a Command Prompt and type this at the Prompt:
          Code:
          fastboot flashing lock
        3. You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
        4. Allow the process to complete, then type this at the Command Prompt:
          Code:
          fastboot reboot
        5. Set up your phone.
        6. Enable Developer Options: Settings > System > About phone > Tap Build number 7 times.
        7. Tap Back > Developer options and toggle OEM unlocking to off.


    4. Install Factory Image keep or wipe data

      • Important: When doing a major upgrade i.e., Android 7.x.x to Android 8.0.0/Android 8.1.0. I recommend wiping data.
      • Backup your data and Internal storage
      • Download the appropriate Factory Image: "marlin" for Pixel XL to your Computer.
      • Extract the factory Image to the platform-tools folder or the folder that has fastboot in it.
        1. Keep Data

          • Open the folder you extracted the Factory Image to and Edit the flash-all.bat file to remove -w from this command: fastboot -w update image-marlin-aaa9.999999.999.zip
            Note: If you do not remove the -w not only will your data be erased but also your internal storage will be erased.
          • Boot Bootloader
          • Connect the phone to the Computer with USB cord.
          • Open a Command Prompt on your computer.:
          • Type
            Code:
            flash-all
            at the Command Prompt and press enter.
          • Do #7 or #8 to root/reroot
        2. Wipe Data

          • Open the folder you extracted the Factory Image to and Verify the flash-all.bat file has the -w in this command: fastboot -w update image-marlin-aaa9.999999.999.zip
            Note: This will erase your data and internal storage.
          • Boot Bootloader
          • Connect the phone to the Computer with USB cord.
          • Open a Command Prompt on your computer.:
          • Type
            Code:
            flash-all
            at the Command Prompt and press enter.
          • Do #7 or #8 to root/reroot
    5. ADB Sideload

      • Boot Recovery
        -- On the Computer
      • Connect the phone to the Computer.
      • Open a Command Prompt.
        -- On the Phone
      • Boot recovery
      • Tap Advanced > ADB Sideload.
      • Swipe the slider to start the ADB connection.
        -- Sideload the ZIP
      • Copy and paste the Zip file you want sideload to the Platform-tools folder or the folder that 'adb.exe' is in.
      • At the Command Prompt type:
        Code:
        adb sideload <space> <file name>
        Example: adb sideload example.zip
      • Press enter to begin the sideloading process.
      • When, you see a Reboot System button, tap it.
    6. Extract/Flash boot.img

      • Extract boot.img

        1. Use a File Explorer to extract the boot.img from the Factory Image.
        2. Extract the Factory Image file (marlin-opm-9.999999.999-99a-factory-a9a9999.zip) to a folder.
        3. Open the folder and, extract the Image file (image-marlin-aaa9.999999.999.99a.zip).
      • Flash boot.img

        Note: Flashing this file removes root.
        1. Open the folder you extracted the 'image file' to and copy the boot.img file to the platform-tools or to the folder that has fastboot in it.
        2. Boot Bootloader
        3. Connect the phone to the Computer
        4. Open a Command Prompt and type the following command at the prompt:
          Code:
          fastboot flash boot --slot all boot.img
        5. Reboot
    7. Root/Reroot with Magisk - Pass SafetyNet

      • Important: Set Pin before installing TWRP:
        Settings > Security & location >Screen lock > Pin


      [*]Root/Reroot with Magisk - Pass SafetyNet without installing TWRP

      • Important: Set Pin before booting TWRP:
        Settings > Security & location >Screen lock > Pin
      • Note: You might have noticed in the 'Install Custom kernel' section that some Custom kernels are installed before Magisk while others are installed after Magisk. The best answer I could find for when to flash a Custom Kernel when using Magisk for root is, if the Custom Kernel modifies/patches the boot image you install Magisk then the Custom Kernel otherwise you install the Custom Kernel then Magisk.
      • Backup your data and Internal storage
      • Download files:
        • See 'Download files' in #7 above - Do not download TWRP zip file.
      • Boot Bootloader
      • Connect the phone to the Computer with USB cord.
      • Open a Command Prompt on your computer.
      • Copy twrp-3.2.3-1-marlin.img to the platform-tools folder or the folder that fastboot is in and rename it twrp.img
      • Type
        Code:
        fastboot boot twrp.img
        at the Command Prompt and press enter.
      • When TWRP boots, disconnect the phone from the computer.
      • Install Custom Kernel (Optional)
        1. Yes

          • exNoShadez:. nine7nine/Apps

            1. Tap Install, select Magisk-v17.1.zip - (Official)
            2. Tap Add more Zips, select:
              • exns_eas_v3.8.1p_bca050b.zip
                Or
              • (Stable) exNoShadez_eas_v2.8.2_f94351f.zip
            3. Swipe Slider to Install
            4. Save Log
            5. Reboot System
          • ElementalX / Flash /PureZ

            1. Tap Install, select Custom Kernel:
            2. Tap Add more Zips, select Magisk-v17.1(.zip - (Offical)
            3. Swipe Slider to Install
            4. Save Log
            5. Reboot System
        2. No

          • Tap Add more Zips, select Magisk-v17.1(.zip - (Offical)
          • Swipe Slider to Install
          • Save Log
          • Reboot System
      • Install Modules - BusyBox, etc. (Optional)
        • Open Magisk Manager, tap Menu, tap downloads.

      [*]Update Magisk

      1. Magisk Notification is on.

        • Turn on Magisk Manager update notification: Open MagiskManager > Tap menu icon > Settings > Update Channel > Select: Stable, Beta or Custom
          • Custom is used to get updates for Unofficial Magisk Builds.
        • When Magisk Manager notifies you of update availibility.
        • Tap install.
        • Select, Direct Install (Recommended)
        • When it finishes installing
        • Tap, Save Log
        • Tap, Reboot
        • Done!
        • Log location: /storage/emulated/0/MagiskManager/logs/install_log_...
      2. Magisk Notification is off.

        • Open Magisk Manager
        • When asked 'Do you want to install Magisk-vxx.x.zip now?
        • Tap install.
        • Select, Direct Install (Recommended)
        • When it finishes installing
        • Tap, Save Log
        • Tap, Reboot
        • Done!
        • Log location: /storage/emulated/0/MagiskManager/logs/install_log_...
      3. Unofficial Magisk Links and Channels

        • To set the Magisk Notification Update Channel for Unofficial Magisk Builds: Open MagiskManager > Tap menu icon > Settings > Update Channel > Select: Custom > Copy the link address below and paste it on the line:
          1. ianmacd
            Code:
            https://raw.githubusercontent.com/ianmacd/MagiskBuilds/master/updates/ianmacd.json
          2. kantjer
            Code:
            https://raw.githubusercontent.com/kantjer/MagiskFiles/master/updates/kantjer.json
          3. topjohnwu has a new channel:
            [DEV] Magisk Canary Channel - Bleeding Edge Builds by topjohnwu Please, read the OP for the URL.
        • When Magisk Manager notifies you of an update:
        • Tap install.
        • Select, Direct Install (Recommended)
        • When it finishes installing
        • Tap, Save Log
        • Tap, Reboot
        • Done!
        • Log location: /storage/emulated/0/MagiskManager/logs/install_log_...



      [*][Magisk] Systemless Xposed v89.3/v90.1-beta3 (SDK 21-27)

      [*]Custom ROMs for Pixel XL

      • Need help with a Custom ROM?
        • First, follow the Installation Instructions in the OP (Post 1) of the Custom ROM you want to install.
        • Second, if you have a problem Installing it, Search the thread of the Custom ROM you want to install for solutions to problem before posting a request for help on their thread.

      [*]Audio Mod


      [*]Other: TWRP Backup/TWRP Update

      • TWRP Backup

        1. Boot Recovery.
        2. Tap Backup and select Partitions to backup
          • Boot
          • System Image
          • Vendor Image
          • Data (Optional)
          • EFS (Once per major upgrade)
        3. Swipe Slider to backup
        4. Your backup will be stored in /Storage/Emulated/0/TWRP/...
        5. Note: If you are unable to make a backup to internal storage with trwp 3.2.2-0 try backing up to USB-OTG
      • Update TWRP

        1. TWRP Installation Instructions:
        2. "If you already have TWRP installed: Download the latest zip and install the zip using TWRP".

     
    Last edited:

    jk8260

    Senior Member
    Dec 23, 2013
    440
    209
    Avalon
    at #5 why do I need to wipe data if coming from 8.0.0? or is it just a precaution?

    FWIW, I am on 8.1 from 8.0 Nov patch and did not factory reset, just flash-all with -w removed (actually I run each command in that file myself). Everything works fine and no data/app loss...
     

    Papote3

    Senior Member
    Dec 10, 2010
    343
    133
    FWIW, I am on 8.1 from 8.0 Nov patch and did not factory reset, just flash-all with -w removed (actually I run each command in that file myself). Everything works fine and no data/app loss...

    Yeah that's what I thought. I think he just writes it just as a precaution, in case anything goes wrong on 8.1, first factory reset and then write the problem if it still persist
     

    Juhler

    Senior Member
    Nov 23, 2012
    59
    12
    Kolding
    Update worked like a charm on my standard Pixel.

    But somehow TWRP will not decrypt, keep asking for password even though I always had a pattern which worked flawlessly in TWRP. Any suggestions so I can get rooted again?

    EDIT: After a few password attempts, removing the password altogether worked. When installing TWRP.zip the command window says E:This TWRP does not have synthetic password decrypt support, that must be why I had problems.

    EDIT2: SuperSU does not seem to work :(
     
    Last edited:

    HACK3DANDR0ID

    Senior Member
    May 25, 2017
    1,158
    323
    41
    New Jersey
    Update worked like a charm on my standard Pixel.

    But somehow TWRP will not decrypt, keep asking for password even though I always had a pattern which worked flawlessly in TWRP. Any suggestions so I can get rooted again?

    EDIT: After a few password attempts, removing the password altogether worked. When installing TWRP.zip the command window says E:This TWRP does not have synthetic password decrypt support, that must be why I had problems.

    EDIT2: SuperSU does not seem to work :(

    Password Encryption isnt working on the new TWRP3.2.0 gotta wait for an update or remove passwords all together...
     
    • Like
    Reactions: oxman777

    AP2FTW

    Senior Member
    Jul 26, 2013
    416
    114
    Mia
    Update worked like a charm on my standard Pixel.

    But somehow TWRP will not decrypt, keep asking for password even though I always had a pattern which worked flawlessly in TWRP. Any suggestions so I can get rooted again?

    EDIT: After a few password attempts, removing the password altogether worked. When installing TWRP.zip the command window says E:This TWRP does not have synthetic password decrypt support, that must be why I had problems.

    EDIT2: SuperSU does not seem to work :(
    Supersu wasn't even in my app drawer after flashing the zip so after rebooting I just went into the zip and installed the apk manually
     

    NepoRood

    Retired Forum Moderator
    Jan 26, 2016
    2,911
    3,860
    Bugtussle
    Just use adb sideload...

    If you want to keep all your data, just sideload the OTA via adb, instead of flashing the full factory image...

    My Steps:
    1) Flash stock boot.img (November for me, I used TWRP)
    2) Reboot recovery
    3) Choose: Apply Update from ADB
    4) adb sideload marlin-ota-opm1.171019.011-9e7f2bb8.zip
    5) reboot system
    6) set screen lock to "none"
    7) copy twrp-pixel-installer-marlin-3.2.0-0.zip to your internal storage
    8) reboot bootloader
    9) fastboot twrp.img
    10) Install: twrp-pixel-installer-marlin-3.2.0-0.zip
    11) reboot recovery
    12) Install: SR5-SuperSU-v2.82-SR5-20171001224502.zip
    13) reboot system
    14) profit!

    If you knew this, great, if you didn't, you do now :good:

    Regards,
    Nepo
     
    • Like
    Reactions: Panamon

    Homeboy76

    Senior Member
  • Aug 24, 2012
    2,533
    1,229
    If you want to keep all your data, just sideload the OTA via adb, instead of flashing the full factory image...

    My Steps:
    1) Flash stock boot.img (November for me, I used TWRP)
    2) Reboot recovery
    3) Choose: Apply Update from ADB
    4) adb sideload marlin-ota-opm1.171019.011-9e7f2bb8.zip
    5) reboot system
    6) set screen lock to "none"
    7) copy twrp-pixel-installer-marlin-3.2.0-0.zip to your internal storage
    8) reboot bootloader
    9) fastboot twrp.img
    10) Install: twrp-pixel-installer-marlin-3.2.0-0.zip
    11) reboot recovery
    12) Install: SR5-SuperSU-v2.82-SR5-20171001224502.zip
    13) reboot system
    14) profit!

    If you knew this, great, if you didn't, you do now :good:

    Regards,
    Nepo

    Good Information! :)
    Did you flash a Custom Kernel (ElementalX-P-3.00.zip) or UPDATE-suhide-v1.09-20171001222116.zip to pass SafetyNet?
     
    Last edited:

    Homeboy76

    Senior Member
  • Aug 24, 2012
    2,533
    1,229
    Yeah that's what I thought. I think he just writes it just as a precaution, in case anything goes wrong on 8.1, first factory reset and then write the problem if it still persist

    There are three reasons I recommend #4 - 'Wipe Data' prior to rooting:
    a. I write all my guides with step by step instructions for noobs.
    b. Some have reported data corruption when not doing #4 - 'Wipe Data'.
    c. When upgrading the OS, I always start with a clean install.

    If you want to upgrade without a clean installation that's ok too, but it is much easier to trouble shoot problems if you start with a clean installation.
     
    Last edited:

    badabing2003

    Senior Member
    Sep 17, 2012
    331
    89
    If you want to keep all your data, just sideload the OTA via adb, instead of flashing the full factory image...



    My Steps:

    1) Flash stock boot.img (November for me, I used TWRP)

    2) Reboot recovery

    3) Choose: Apply Update from ADB

    4) adb sideload marlin-ota-opm1.171019.011-9e7f2bb8.zip

    5) reboot system

    6) set screen lock to "none"

    7) copy twrp-pixel-installer-marlin-3.2.0-0.zip to your internal storage

    8) reboot bootloader

    9) fastboot twrp.img

    10) Install: twrp-pixel-installer-marlin-3.2.0-0.zip

    11) reboot recovery

    12) Install: SR5-SuperSU-v2.82-SR5-20171001224502.zip

    13) reboot system

    14) profit!



    If you knew this, great, if you didn't, you do now :good:



    Regards,

    Nepo


    Thanks

    Don't you need stock recovery to be able to apply OTA?
    I don't see a step doing that, and I suppose you're on TWRP, or were you already on stock recovery?
    If so, then better make that a clear step.
     

    NepoRood

    Retired Forum Moderator
    Jan 26, 2016
    2,911
    3,860
    Bugtussle
    Thanks

    Don't you need stock recovery to be able to apply OTA?
    I don't see a step doing that, and I suppose you're on TWRP, or were you already on stock recovery?
    If so, then better make that a clear step.

    That's covered with Step #1, friend

    1) Flash stock boot.img (November for me, I used TWRP)

    Since boot and recovery are on the same partition, flashing stock boot will give you stock recovery. I flashed my stock boot using TWRP, however, it can be flashed via fastboot as well.

    AFAIK, this can be done for all updates (I've used this method since Oreo came out), it's just like taking the OTA from Gooble, you just download it yourself :good:

    Regards,
    Nepo

    PS, I did flash full factory image when upgrading from Nougat to Oreo, just FYI
     
    • Like
    Reactions: badabing2003

    badabing2003

    Senior Member
    Sep 17, 2012
    331
    89
    That's covered with Step #1, friend



    Since boot and recovery are on the same partition, flashing stock boot will give you stock recovery. I flashed my stock boot using TWRP, however, it can be flashed via fastboot as well.

    AFAIK, this can be done for all updates (I've used this method since Oreo came out), it's just like taking the OTA from Gooble, you just download it yourself :good:

    Regards,
    Nepo

    PS, I did flash full factory image when upgrading from Nougat to Oreo, just FYI
    Thanks for the clarification, didn't know that was the case.
    I never flashed boot using twrp, would it do it for all slots, I guess it would.

    Sent from my Pixel XL using Tapatalk
     

    xomikronx

    Senior Member
    Jul 22, 2009
    322
    38
    Imaginarium
    Is anyone getting this error?
    Code:
    wiping userdata...
    /usr/local/bin/mke2fs failed with status 1
    mke2fs failed: 1
    error: Cannot generate image for userdata

    I'm using the wipe option, but haven't ran into this one before.
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 42
      [Guide] Pixel XL Android 8.1.0 (OREO) Unlock/Lock Bootloader + Install Stock Images/Custom kernels/TWRP Recovery/Systemless ROOT + July 2018 Security Patch

      Intro
      • This Guide is for Pixel XL owners that want to Root their phone, and enjoy the benefits of rooting it without installing a Custom ROM. However, for those that just can't live without a Custom ROM, take a look at 'Custom ROMs for Pixel XL'.
      • This Guide also works for the Pixel owners: If, they download the correct files for their phone.
      • This Guide is not for use with the Second Generation Pixel 2 or Pixel 2 XL devices.

      Update(s):
      • Custom ROM - crDroid v4.7
      • Note: Some Custom ROM's have the latest Security Patch.
      • Install Custom Kernel: - See #7, or #8

      Disclaimers:
      • I assume no responsibility for the malfunctioning/bricking of your phone.
      • The order of listed items i.e., Custom Kernels, Custom ROMS, etc. Does not indicate my preference for them. It is your responsibility to do the research before selecting an item.

      Prerequisites

      Other

      Credits/Thanks/Recognitions
      • Heisenberg RETIRED FORUM MODERATOR - He set the standard for creating, detailed, Guides.
      • Those I may have, inadvertently, forgotten.

      Index
      1. Open a Command Prompt/Boot Bootloader/Boot Recovery

        • Open Command Prompt on Computer
          • Option 1 - Open File Explorer, click the platform-tools folder, press shift, right click, and select open command prompt here.
          • Option 2 - Open File Explorer, click the platform-tools folder, highlight the directory information in the address bar or click the folder (left side of address bar) to highlight it type cmd and press enter.
          • Note: If your computer only has 'open powershell here' in the context menu. Use option 2.
        • Boot Bootloader:
          • Power off phone, press and hold the power and volume down buttons until you see Start.
        • Boot Recovery
          • Power off phone, press and hold the power and volume down buttons until you see Start. Use volume up/down button until you see Recovery mode. Press power button.
      2. Test ADB (Android Debug Bridge)/fastboot

        • ADB
          1. Enable USB Debugging - Tap Settings > System > About Phone > Developer Options. Enable USB Debugging.
          2. Open a Command Prompt on your computer.
          3. Type this at the prompt to test ADB.
            Code:
            adb version
            It should return a version number for ADB.
            Note: If it does not return a version number type
            Code:
            adb reboot bootloader
            and try
            Code:
            adb devices
            again.
        • fastboot
          1. Enable USB Debugging - Tap Settings > System > About Phone > Developer Options. Enable USB Debugging.
          2. Open a Command Prompt on your computer.
          3. Boot Bootloader
          4. Connect the phone to the Computer with USB cord.
          5. Type this at the prompt and press enter to test fastboot.
            Code:
            fastboot devices
            It should return your device serial number.
            Note: If it does not return a version number type
            Code:
            adb reboot bootloader
            and try
            Code:
            fastboot devices
            again.
      3. Unlock Bootloader/Return Phone to Stock/Lock Bootloader

        • Unlock Bootloader

          1. Backup your data and Internal storage
          2. Activate Developer Options: Tap Settings > System > About Phone > Tap Build Number until you see you're a Developer. Tap back > Developer Options. Enable OEM Unlock and, USB Debugging.
          3. Boot Bootloader
          4. Connect the phone to the Computer with USB cord.
          5. Open a Command Prompt on your computer and type
            Code:
            fastboot flashing unlock
            and press enter.
            This will erase all user data from the device!
          6. You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
          7. Allow the process to complete and then type
            Code:
            fastboot reboot
            at the Command Prompt and press enter.
          8. When your phone reboots disconnect your usb cable.
            Note: After unlocking your bootloader, you'll see a warning: Your device software can't be checked for corruption. Please lock the bootloader. You will see this warning until, you relock the bootloader.

            Important: Do not relock your bootloader until you have returned the device to Stock..
        • Return Phone to Stock

          1. Backup your data and Internal storage
          2. Download the latest Factory Image
          3. Extract factory Image to the platform-tools folder, or the folder that has fastboot in it.
          4. Verify -w is present in flash-all.bat. Example: fastboot -w update image-marlin-aaa9.999999.999.zip
            Note: This will erase all your Data and Internal Storage
          5. Boot bootloader
          6. Connect your phone to your Computer with a USB cable.
          7. Open a Command Prompt:
          8. Flash the Stock Factory Image on Both Slots
            • Type this at the Command Prompt:
              Code:
              flash-all
            • Let the phone boot.
            • Boot bootloader
            • Open Command Prompt:
            • Switch to the other slot.
            • Type this at the Command Prompt:
              Code:
              fastboot --set-active=other
            • Then type this at the Command Prompt:
              Code:
              flash-all
            • Let the phone boot.
        • Lock Bootloader

          • 'B' must be completed before performing this step!
          1. Boot bootloader
          2. Open a Command Prompt and type this at the Prompt:
            Code:
            fastboot flashing lock
          3. You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
          4. Allow the process to complete, then type this at the Command Prompt:
            Code:
            fastboot reboot
          5. Set up your phone.
          6. Enable Developer Options: Settings > System > About phone > Tap Build number 7 times.
          7. Tap Back > Developer options and toggle OEM unlocking to off.


      4. Install Factory Image keep or wipe data

        • Important: When doing a major upgrade i.e., Android 7.x.x to Android 8.0.0/Android 8.1.0. I recommend wiping data.
        • Backup your data and Internal storage
        • Download the appropriate Factory Image: "marlin" for Pixel XL to your Computer.
        • Extract the factory Image to the platform-tools folder or the folder that has fastboot in it.
          1. Keep Data

            • Open the folder you extracted the Factory Image to and Edit the flash-all.bat file to remove -w from this command: fastboot -w update image-marlin-aaa9.999999.999.zip
              Note: If you do not remove the -w not only will your data be erased but also your internal storage will be erased.
            • Boot Bootloader
            • Connect the phone to the Computer with USB cord.
            • Open a Command Prompt on your computer.:
            • Type
              Code:
              flash-all
              at the Command Prompt and press enter.
            • Do #7 or #8 to root/reroot
          2. Wipe Data

            • Open the folder you extracted the Factory Image to and Verify the flash-all.bat file has the -w in this command: fastboot -w update image-marlin-aaa9.999999.999.zip
              Note: This will erase your data and internal storage.
            • Boot Bootloader
            • Connect the phone to the Computer with USB cord.
            • Open a Command Prompt on your computer.:
            • Type
              Code:
              flash-all
              at the Command Prompt and press enter.
            • Do #7 or #8 to root/reroot
      5. ADB Sideload

        • Boot Recovery
          -- On the Computer
        • Connect the phone to the Computer.
        • Open a Command Prompt.
          -- On the Phone
        • Boot recovery
        • Tap Advanced > ADB Sideload.
        • Swipe the slider to start the ADB connection.
          -- Sideload the ZIP
        • Copy and paste the Zip file you want sideload to the Platform-tools folder or the folder that 'adb.exe' is in.
        • At the Command Prompt type:
          Code:
          adb sideload <space> <file name>
          Example: adb sideload example.zip
        • Press enter to begin the sideloading process.
        • When, you see a Reboot System button, tap it.
      6. Extract/Flash boot.img

        • Extract boot.img

          1. Use a File Explorer to extract the boot.img from the Factory Image.
          2. Extract the Factory Image file (marlin-opm-9.999999.999-99a-factory-a9a9999.zip) to a folder.
          3. Open the folder and, extract the Image file (image-marlin-aaa9.999999.999.99a.zip).
        • Flash boot.img

          Note: Flashing this file removes root.
          1. Open the folder you extracted the 'image file' to and copy the boot.img file to the platform-tools or to the folder that has fastboot in it.
          2. Boot Bootloader
          3. Connect the phone to the Computer
          4. Open a Command Prompt and type the following command at the prompt:
            Code:
            fastboot flash boot --slot all boot.img
          5. Reboot
      7. Root/Reroot with Magisk - Pass SafetyNet

        • Important: Set Pin before installing TWRP:
          Settings > Security & location >Screen lock > Pin


        [*]Root/Reroot with Magisk - Pass SafetyNet without installing TWRP

        • Important: Set Pin before booting TWRP:
          Settings > Security & location >Screen lock > Pin
        • Note: You might have noticed in the 'Install Custom kernel' section that some Custom kernels are installed before Magisk while others are installed after Magisk. The best answer I could find for when to flash a Custom Kernel when using Magisk for root is, if the Custom Kernel modifies/patches the boot image you install Magisk then the Custom Kernel otherwise you install the Custom Kernel then Magisk.
        • Backup your data and Internal storage
        • Download files:
          • See 'Download files' in #7 above - Do not download TWRP zip file.
        • Boot Bootloader
        • Connect the phone to the Computer with USB cord.
        • Open a Command Prompt on your computer.
        • Copy twrp-3.2.3-1-marlin.img to the platform-tools folder or the folder that fastboot is in and rename it twrp.img
        • Type
          Code:
          fastboot boot twrp.img
          at the Command Prompt and press enter.
        • When TWRP boots, disconnect the phone from the computer.
        • Install Custom Kernel (Optional)
          1. Yes

            • exNoShadez:. nine7nine/Apps

              1. Tap Install, select Magisk-v17.1.zip - (Official)
              2. Tap Add more Zips, select:
                • exns_eas_v3.8.1p_bca050b.zip
                  Or
                • (Stable) exNoShadez_eas_v2.8.2_f94351f.zip
              3. Swipe Slider to Install
              4. Save Log
              5. Reboot System
            • ElementalX / Flash /PureZ

              1. Tap Install, select Custom Kernel:
              2. Tap Add more Zips, select Magisk-v17.1(.zip - (Offical)
              3. Swipe Slider to Install
              4. Save Log
              5. Reboot System
          2. No

            • Tap Add more Zips, select Magisk-v17.1(.zip - (Offical)
            • Swipe Slider to Install
            • Save Log
            • Reboot System
        • Install Modules - BusyBox, etc. (Optional)
          • Open Magisk Manager, tap Menu, tap downloads.

        [*]Update Magisk

        1. Magisk Notification is on.

          • Turn on Magisk Manager update notification: Open MagiskManager > Tap menu icon > Settings > Update Channel > Select: Stable, Beta or Custom
            • Custom is used to get updates for Unofficial Magisk Builds.
          • When Magisk Manager notifies you of update availibility.
          • Tap install.
          • Select, Direct Install (Recommended)
          • When it finishes installing
          • Tap, Save Log
          • Tap, Reboot
          • Done!
          • Log location: /storage/emulated/0/MagiskManager/logs/install_log_...
        2. Magisk Notification is off.

          • Open Magisk Manager
          • When asked 'Do you want to install Magisk-vxx.x.zip now?
          • Tap install.
          • Select, Direct Install (Recommended)
          • When it finishes installing
          • Tap, Save Log
          • Tap, Reboot
          • Done!
          • Log location: /storage/emulated/0/MagiskManager/logs/install_log_...
        3. Unofficial Magisk Links and Channels

          • To set the Magisk Notification Update Channel for Unofficial Magisk Builds: Open MagiskManager > Tap menu icon > Settings > Update Channel > Select: Custom > Copy the link address below and paste it on the line:
            1. ianmacd
              Code:
              https://raw.githubusercontent.com/ianmacd/MagiskBuilds/master/updates/ianmacd.json
            2. kantjer
              Code:
              https://raw.githubusercontent.com/kantjer/MagiskFiles/master/updates/kantjer.json
            3. topjohnwu has a new channel:
              [DEV] Magisk Canary Channel - Bleeding Edge Builds by topjohnwu Please, read the OP for the URL.
          • When Magisk Manager notifies you of an update:
          • Tap install.
          • Select, Direct Install (Recommended)
          • When it finishes installing
          • Tap, Save Log
          • Tap, Reboot
          • Done!
          • Log location: /storage/emulated/0/MagiskManager/logs/install_log_...



        [*][Magisk] Systemless Xposed v89.3/v90.1-beta3 (SDK 21-27)

        [*]Custom ROMs for Pixel XL

        • Need help with a Custom ROM?
          • First, follow the Installation Instructions in the OP (Post 1) of the Custom ROM you want to install.
          • Second, if you have a problem Installing it, Search the thread of the Custom ROM you want to install for solutions to problem before posting a request for help on their thread.

        [*]Audio Mod


        [*]Other: TWRP Backup/TWRP Update

        • TWRP Backup

          1. Boot Recovery.
          2. Tap Backup and select Partitions to backup
            • Boot
            • System Image
            • Vendor Image
            • Data (Optional)
            • EFS (Once per major upgrade)
          3. Swipe Slider to backup
          4. Your backup will be stored in /Storage/Emulated/0/TWRP/...
          5. Note: If you are unable to make a backup to internal storage with trwp 3.2.2-0 try backing up to USB-OTG
        • Update TWRP

          1. TWRP Installation Instructions:
          2. "If you already have TWRP installed: Download the latest zip and install the zip using TWRP".

      3
      Can the original post be updated? There are some errors and some missing info there. I just followed it all to root my pixel xl and ran into a few issues.
      1. When you rename the trwp file, do NOT not it "twrp.img". It is already an image. When renaming simply name it twrp. If you name it exactly "twrp.img" then the file will be twrp.img.img
      2. When going through initial start-up, do NOT copy your previous data back in from your previous account. IDKY but it made my phone pathetically slow. Had to wipe data, re-install twrp and magisk. Then re-install all my apps from play-store library. Everything was smooth and still is.
      3. TWRP 3.2.1-0 that the OP says to use will work but does not support custom ROMs. I found out after the fact. Tried to revert back by install the 3.2.0-0 twrp zip. But then the system would never boot up, would only boot to recovery. So I did factory reset and started over. I fastbooted the 3.2.1-0 zip and installed the 3.2.0-0 zip. then elemental and magisk. then benzo rom.
      4. This problem happened somewhere in between trying to get all this done and I have not been able to fix it yet. My phone no longer shows up on my pc for file transfer. I had to use photo transfer and place my zip files there to be able to place them on my phone for installation. If anyone can help me here I would appreciate it thank you.
      homeboy76; said:
      First, most users of this thread understand when you rename 'twrp-3.2.1-0-marlin.img' to twrp.img you remove '-3.2.1-0-marlin'.

      Second, none of the instructions in the OP tell you to ...copy your previous data back in from your previous account. #4 provides instructions for keeping your data.

      Third, the OP does not provide instructions to install Custom ROMS. The OP provides links for Custom ROMS '#11 - Custom ROMS for Pixel XL'.

      Fourth, you copied 'your previous data back in from your previous account'. Try Windows 10 laptop won't recognize my Pixel XL. If that doesn't work. Doing #4 - Wipe Data or Factory Reset might help.
      This worked, device is showing up again. Thank you.

      ---------- Post added at 06:40 AM ---------- Previous post was at 06:26 AM ----------

      First, most may know that. I should have. But it was just a mistake I made that I wanted to make sure no one else did.

      Second, I didn't say that OP said to copy previous data. I was just warning against re-adding your apps and messaging data via google back-up. As it made my phone incredibly slow.
      I was not posting to say anything OP said is incorrect. Rather just wanted to prevent anyone else making my mistakes.

      Third. He doesn't give any instructions for custom ROM install but he does provide a list of 4 different custom ROMs. If anyone wanted to install any of those four ROMs, they will not be able to if
      they install TWRP 3.2.1-0. I did everything else first, then went to the links for all four ROMs to see which I liked. That's when I seen that everyone said that TWRP 3.2.1-0 did not allow custom ROM install and had to go back and make changes to revert back to 3.2.0-0. Which ultimately ended me up with wiping and restarting fresh to get it to work properly.

      Fourth, if you look at number 2 you'll see that I already factory reset after I restored the app and message data that made my phone so slow. It fixed the speed issue. I was able to fix the file transfer issue by following fiverings solution.

      Again none of what I said is to translate that OP wrote incorrect instructions. Just wanted to add additional info incase someone else comes along that may make the same mistakes I made.

      MR. Wiz / MJCanada-dsmer

      I wrote my response based on MR.Wis opening comments:
      "Can the original post be updated? There are some errors and some missing info there. I just followed it all to root my pixel xl and ran into a few issues."

      Which indicates the instructions in the OP are incorrect. That is not true.

      MJCanada-dsmer:
      Did you or Mr. Wiz read 'Intro a.'?

      Most users of XDA, including myself, have made the same mistake "MR. Wiz" made on more than one occasion: Not, carefully, reading the instructions until we understood :confused: them or if they would help us accomplish what we wanted to do. Then, when something goes wrong :( we get frustrated and ,sometime, wrongly blame the instructions. It is called a "learning Curve". :)

      " I was able to fix the file transfer issue by following fiverings solution."

      That's what I love about XDA. It is a group of people sharing information: Solutions to problems.

      There is more than one way to solve a problem. :)
      3
      Do SuperSU work with Android 8.1 and TWRP 3.2.1.0?

      SuperSU v2.82 SR5, Yes

      Edit1: I read on the TWRP RC1 thread that it works if you do not flash twrp 3.2.1-0.zip
      Edit2: Maybe, I found this in the OP of TWRP 3.2.1-0 for Pixel Devices by Dees_Troy:
      NOTE about 3.2.1-0: This version will decrypt Android 8.1, however the new image is built in Android 8.1 and may not be compatible with SuperSU and/or Magisk until they update their stuff. I have not tested. Good luck.

      I tested SuperSU and Magisk, Magisk worked.
      a. Flashed Factory Image with Flash-all.bat (#5 in OP)
      b. Fastboot twrp-3.2.1-0.img
      c. Installed twrp-3.2.1-0.zip
      d. Reboot recovery
      e. Installed Magisk 14.5 (1456)
      f. Reboot System
      3
      This is the most incredible thread. Likely to be my Swiss Army Knife for using Marlin.

      All went perfect for me with your 7. Root with Magisk - Pass SafetyNet Clean Install instruction until I tried to Boot to Recovery after installing the 3.2.1-0 zip. It could not decrypt my data. Had to fastboot boot the 3..2.1-0 img file to be able to finish and root with 15.3 Checked my zip on the phone that I installed and it has the correct MD5 as per the TWRP website and matches the one on my PC that I copied to my Pixel XL. Not sure why it would not decrypt. I've lived so long with just having the img to boot TWRP that it's not a big issue for me.

      have to eat part of my words. I just was able to boot to the bootloader and then boot to recovery and decrypt. Guess I should have done that yesterday instead of rebooting TWRP from TWRP and not boing to the bootloader first and then to recovery. Works perfectly as advertised. Thanks again.

      Thanks for all your work for us. It's very appreciated.
      Hmmm, the 'thanks button' must be broken on this thread.
      Everyone is writing 'Thanks'.
      3
      Yeah that's what I thought. I think he just writes it just as a precaution, in case anything goes wrong on 8.1, first factory reset and then write the problem if it still persist

      There are three reasons I recommend #4 - 'Wipe Data' prior to rooting:
      a. I write all my guides with step by step instructions for noobs.
      b. Some have reported data corruption when not doing #4 - 'Wipe Data'.
      c. When upgrading the OS, I always start with a clean install.

      If you want to upgrade without a clean installation that's ok too, but it is much easier to trouble shoot problems if you start with a clean installation.
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone