• 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] Pixel XL Android 9.0 (Pie) Unlock/Root/Install Images/Kernels/Recovery +

Search This thread
I now understand. Haha. Took me long enough. ;p
I didn't have to flash to both slots, one works as well. Got it all taken care of. For anyone with out a computer you can indeed unlock bootloader and root your device using termux app and Osmosis's static fastboot magisk module from another Android device that's rooted. That is what I did. :)

(Edited)
 
Last edited:

Scorsese19

New member
Sep 23, 2019
1
0
Factory reset

Hello,
Thanks for the guide, its an awesome compilation. Just wondering, after rooting my phone can I just perform a factory reset? Would it brick my phone? Already look around in the replies but could not find anything clear.

Thanks
 

chesslearner

New member
Jul 23, 2019
2
0
Can't install TWRP

I downloaded the latest Android 9.0 image and used flash-all.
Added a PIN to Android
After fastboot boot twrp.img
Installed the TWRP installer zip
Then rebooting to Recovery, TWRP does not appear but instead boots to Android system.
What am I doing wrong?
Thanks
 

[email protected]

Senior Member
Jul 1, 2016
1,107
328
colorado springs
I downloaded the latest Android 9.0 image and used flash-all.
Added a PIN to Android
After fastboot boot twrp.img
Installed the TWRP installer zip
Then rebooting to Recovery, TWRP does not appear but instead boots to Android system.
What am I doing wrong?
Thanks
I'm going to assume you can't boot into twrp

Try setting system about
Then tap build number 5 times to get developer options
Go to developer options and enable USB debugging
Plug in phone to a computer with adb and fasboot installed on it
Then accept USB debugging always prompt on your phone
Then type in adb on the computer
Adb reboot recovery
And you should be in recovery
 
  • Like
Reactions: chesslearner

chesslearner

New member
Jul 23, 2019
2
0
Before I read this post, I was able to fastboot boot twrp.img and install Magisk. I think I understand now. Pixel XLs do not have a typical Recovery partition so, it won't work when I select Recovery from the bootloader. However, adb reboot recovery works?

I'm going to assume you can't boot into twrp

Try setting system about
Then tap build number 5 times to get developer options
Go to developer options and enable USB debugging
Plug in phone to a computer with adb and fasboot installed on it
Then accept USB debugging always prompt on your phone
Then type in adb on the computer
Adb reboot recovery
And you should be in recovery
 

[email protected]

Senior Member
Jul 1, 2016
1,107
328
colorado springs
Before I read this post, I was able to fastboot boot twrp.img and install Magisk. I think I understand now. Pixel XLs do not have a typical Recovery partition so, it won't work when I select Recovery from the bootloader. However, adb reboot recovery works?

Rebooting from bootloader should take you to recovery odd

If your rooted there are reboot menu apps you can use to reboot to recovery or using a terminal emulator app you can type su approve root access then type reboot recovery
 
  • Like
Reactions: chesslearner

lichan

Senior Member
Jan 9, 2011
138
87
Oklahoma City
I downloaded the latest Android 9.0 image and used flash-all.
Added a PIN to Android
After fastboot boot twrp.img
Installed the TWRP installer zip
Then rebooting to Recovery, TWRP does not appear but instead boots to Android system.
What am I doing wrong?
Thanks

Try using TWRP 3.2.3-1. Some newer versions do not write to the partition. See entry #519 on the previous page.
 
  • Like
Reactions: chesslearner

Reedickulus

Member
Aug 3, 2011
14
1
I just got a Pixel XL and was using this thread to move from Android 8 to 9, install TWRP and root with Magisk. Following the process in the OP I was never able to get TWRP 3.3.1-1 and/or Magisk 19.3 to install. The Magisk install would give errors '"unable to mount /system" and "unable to mount /vendor". I went back to TWRP 3.2.3-1 and it installed correctly. After that Magisk 19.3 installed and upon boot I had root. So if anybody is having problems with the most current versions don't hesitate to try an earlier known-working version. Now on to Viper4Android and Xposed. Thanks to Homeboy76. These are the most thorough and well written guides I have run across and had the pleasure to use.

Just wanted to post that this POST saved my life. I was trying forever, and was pretty unsuccessful. I had more luck after upgrading to Android 9 (for some reason, couldn't get TWRP or Rooting to work on Android 8). But I definitely had to use these older version of TWRP and Magisk to have success. Thanks for posting this!!!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 52
    [Guide] Pixel XL Android 9.0.0 (Pie) Unlock/Lock Bootloader + Install Stock Images/Custom kernels/TWRP Recovery/Systemless ROOT + December 2019 Security Patch

    Introduction
    • 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 Pixel, Pixel 2, Pixel 2 XL, Pixel 3a, or Pixel 3a XL phones.

    NEW
    • Android 11 (R) ROM

    Update(s)
    1. Factory/OTA Images - 12/02
    2. Magisk Stable - Magisk-20.4
    3. Magisk Beta - Magisk-20.4
    4. Magisk Canary - Magisk-204xx
    5. T.W.R.P - twrp-3.4.0-0-marlin.img/zip[/URL] 06/25
    6. SDK Platform-tools - r30.0.5 11/04
    7. Custom Kernels
      • No Updated Custom Kernels
    8. Custom ROMs Android 10 (Q)
      • Pixel Experience 10/25
    9. Custom ROMs Android 11 (R)

    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 Pixel XL Guides

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

    Index
    (NOTE: These are not steps 1-13, they are individual sets of information/instructions).

    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.
        • Notes:
          1. If your computer only has 'open powershell here' in the context menu. Use option 2.
          2. If you do not want to open a Command Prompt every time you want to use fastboot, add the path to the Platform-tools folder to Windows environment variables.
      • 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.
      • 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.
    3. Unlock Bootloader/Return Phone to Stock/Lock Bootloader

      • Unlock Bootloader (Google Pixel XL)

        1. Backup your data/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/Internal storage
        2. Settings > System > Advanced > Reset Options > Erase all data (factory reset)
        3. Log in
        4. Set up phone
      • Lock Bootloader (Google Pixel XL)

        • '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 Unlock off.


    4. Install Factory Image keep or wipe data

      • When doing a major upgrade, Android 8.1.0 (Oreo) to Android 9.0.0 (Pie). I suggest wiping data/Clean Install.
      • 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.
          • Reboot
          • 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.
          • Reboot
          • 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 boot.img --slot all
        5. Reboot
    7. Install T.W.R.P./Root/Reroot with Magisk and Pass SafetyNet.

      • Important:
        Set Pin before installing TWRP
        :
        Settings > Security & location >Screen lock > Pin
      • Backup your data and Internal storage
      • Download files:
        • The files listed below are used with 7 and 8.
        1. TWRP
        2. Magisk - Download to your phone
        3. Custom kernels - Download to your phone
          • No Updated Custom Kernels
        4. Kernel Managers - Download to your phone
      • Boot Bootloader
      • Connect the phone to the Computer with USB cord.
      • Copy twrp-3.5.0-0-marlin.img to the platform-tools folder or folder that has fastboot in it and rename it twrp.img.
      • Open a Command Prompt on your computer.
      • At the Command Prompt type:
        Code:
         fastboot boot twrp.img
        and press enter.
        • When TWRP boots, disconnect phone from computer.
        • Swipe to allow modifications.
      • Tap Install select
        twrp-pixel-installer-marlin-3.4.0-0.zip
      • Swipe the slider to install
      • Reboot Recovery
      • If you are rerooting, tap Install, select the latest Magisk's uninstaller.zip, and Swipe the Slider to Install.
        Note: If you have Modules installed, please read these posts by @jcmm11 'RC' before flashing/installing Magisk's Uninstaller.zip: Post 329 and Post 333
      • Install Custom Kernel and Root/Reroot (Optional)
        Note(s):
        • Some Custom Kernels can be updated by flashing via twrp or Kernel Manager without losing root. Check the Custom Kernel thread (OP - Installation/Instructions) to find out which Custom Kernels.
        • Some Custom Kernels can also be Flashed with a Kernel Manager.
        • If you want to flash the kernel via the Kernel Manager instead of twrp skip #7 L1 do #7 L2 then install kernel via Kernel Manager.
        1. Yes

          • No Updated Custom Kernels
        2. No

          • Tap Install, select Magisk-20.4.zip - Stable/Beta
          • Swipe Slider to Install
          • Save Log
          • Reboot System
    8. Boot T.W.R.P./Root/Reroot with Magisk and Pass SafetyNet.

      • Important: Remove Pin before booting TWRP:
        Settings > Security & location >Screen lock > None
      • Backup your data and Internal storage
      • Download files:
        • See #7 - Skip the twrp-pixel-installer-marlin-3.4.0-0.zip
      • Boot Bootloader
      • Connect the phone to the Computer with USB cord.
      • Open a Command Prompt on your computer.
      • Copy twrp-3.4.0-0-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 phone from computer.
        • If requested Swipe to allow modifications.
      • If you are rerooting, tap Install, select the latest Magisk's uninstaller.zip, and Swipe the Slider to Install.
        Note: If you have Modules installed, please read these posts by @jcmm11 'RC' before flashing/installing Magisk's Uninstaller.zip: Post 329 and Post 333
      • Install Custom Kernel and Root/Reroot (Optional)
        Note(s):
        • Some Custom Kernels can be updated by flashing via twrp or Kernel Manager without losing root. Check the Custom Kernel thread (OP - Installation/Instructions) to find out which Custom Kernels.
        • Some Custom Kernels can also be Flashed with a Kernel Manager.
        • If you want to flash the kernel via the Kernel Manager instead of twrp skip #8 I1 do #8 I2 then install kernel via Kernel Manager.
        1. Yes

          • No Updated Custom Kernels
        2. No

          • Tap Install, select Magisk-20.4.zip - Stable/Beta
          • Swipe Slider to Install
          • Save Log
          • Reboot System
    9. Set Magisk Manager's Update Chanel/Update Magisk

      • Set Magisk Manager's Update Channel - Stable/Beta/Custom

        1. Open Magisk Manager > Tap menu icon > Settings > Update Channel > Select Stable, Beta or Custom.
        2. Custom is used to switch to Canary:
          Code:
          https://raw.githubusercontent.com/topjohnwu/magisk_files/canary/debug.json
      • Set Canary's Magisk Manager Update Channel

        • Open Magisk Manager > Tap menu icon > Settings > Update Channel > Select Stable, Beta or Canary.
      • Update Magisk

        1. When Magisk Manager notifies you of an update:
        2. Tap install.
        3. Select, Direct Install (Recommended)
        4. When it finishes installing
        5. Tap, Save Log
        6. Log location: /storage/emulated/0/MagiskManager/logs/install_log_...
        7. Tap, Reboot
        8. Done!
    10. Custom ROMs for Pixel XL

      • Need help with a Custom ROM?
        • First, follow the Installation Instructions in the OP of the Custom ROM you are trying 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.
    11. Audio Mod

    12. Other: TWRP Backup/TWRP Update

      • TWRP Backup

        1. To Internal Storage

          • Boot bootloader
          • Code:
            fastboot boot twrp-3.4.0-0.img
            [*]When twrp-3.4.0-0 boots, tap Backup and select Partitions to backup
            [LIST="(1)"]
            [*]Boot
            [*]System Image
            [*]Data
            [/LIST]
            [*]Tap Select Storage ==> internal storage
            [*]Tap ok
            [*]Swipe Slider to backup
            [*][B]Your backup will be stored in /Storage/TWRP/...[/B]
            [/LIST]
            [/HIDE]
            [*]To OTG-USB Storage
            [HIDE]
            [LIST="a"]
            [*]Boot fastboot mode (#1B)
            [*][CODE]fastboot boot twrp-3.4.0-0.img
            [*]When twrp-3.3.1-3 boots, tap Backup and select Partitions to backup
            [LIST="(1)"]
            [*]Boot
            [*]System Image
            [*]Data
            [/LIST]
            [*]Insert USB-OTG
            [*]Tap Select Storage ==> OTG-USB
            [*]Tap ok
            [*]Swipe Slider to backup
            [*][B]Your backup will be stored in /Storage/TWRP/...[/B]
            [/LIST]
            [/HIDE]
            [/LIST]
            [/HIDE]
            [*][B]Update[URL="https://twrp.me/google/googlepixelxl.html"]TWRP[/URL][/B]
            [/LIST]
            [/HIDE]
            [/LIST]
    3
    Just had a similar issue setting up a brand new Pixel XL that started on Android N, 7.1.4.

    I did the following steps straight from the box:
    • Booted it for the first time and completed the setup with minimal settings (no wifi, no SIM, etc)
    • Connected to Wifi to allow for OEM Unlocking to be enabled in Developer Settings, turned OEM unlocking on
    • Booted into bootloader, ran 'fastboot flashing unlock'
    • Applied latest Marlin factory image from https://developers.google.com/android/images (ran flash-all.bat) to get to 9.0, May 2019 build.
    • Re-completed initial setup
    • Applied a PIN
    • Tried to boot into TWRP to root the device (fastboot boot twrp-3.3.0-0-marlin.img).
    • Entered PIN, but decryption failed

    For the time being I removed the PIN, booted into TWRP, installed Magisk (since TWRP was able to use the default encryption password), then re-added a PIN. Not sure if future attempts to re-root after applying, say, June 2019's factory image will result in the same issue.

    I feel like I've had this issue before but I can't remember how I ultimately solved it.

    As it stands, I have two identical Pixel XLs running the same version of Android 9, both with the same PIN, both booting the same version of TWRP. One will let me decrypt using the PIN, the other one (the one mentioned above) won't.
    3
    Is this the right fix

    Is this the right fix?
    I read this thread when I was looking for a fix.
    Here's the trick... It doesn't mean you can't do these in any other way but you will NOT get stuck if you follow some simple rules...

    Roms only flash while in Slot_A
    Gapps only Flash in Slot_B
    Kernels only flash in Slot_B
    Magisk only flash in Slot_B
    IMG Flash to Slot_B
    TWRP 3.2.0-0 ONLY
    TWRP 3.2.0-0 to either slot
    Do NOT EVER Flash anything other then TWRP, Rom Gapps and Vendor until GOING through first boot. Yes you can but it increases your issues.
    Always always always double check between every install the status of your Overlays folder. Before every rom install Mount System then Go to File Manager and Delete that folder from Slot B before you boot to Slot A to flash the rom. This can hold Data from Magisk and Mods that get all tore up Everytime... It also happens when you reflash Magisk or dirty flash a rom. I'm going to put together a fresh flash below and I'll get into that a little later.

    https://forum.xda-developers.com/pixel-xl/how-to/slota-b-how-to-flash-roms-magisk-kernel-t3754175


    1. I reinstalled the latest TWRP following the installation thread instructions. When I was booting into the system in slot B TWRP was not I could not get the phone to reboot into TWRP recovery.

    2. I made sure Magisk uninstall was flashed into slot A and B to remove as the instructions for Magisk says to do to remove from the system.

    3. I flashed Magisk into slot A with TWPR and tried to booted into system slot A and the system would not boot. It would boot into TWRP.

    4. I flashed Magisk into slot B with TWPR and booted into the system in slot A and Magisk was not in the system. I booted into the system in Slot B and Magisk was installed and I had root.

    I came from Verizon Samsung Note 3 and the flashing and installation for Pixel is entirely different. The thread above was a great guide to give me an idea of how and where to install roms, Gapps, Kernels, IMG, and TWRP. It is an old guide but it shines light on what to do and what not to do. If you have other guides for tips please share.




    The problem with trying to fix an issue without wiping your phone cleanly is that we can't pinpoint whether the problem is within the system or a hardware defect or something else. So when diagnosing an issue, the first thing you should do is a clean install, wiping the entire phone by allowing the flash all bat file to do it's thing and flashing the latest system image. Remember that when that's done you have to allow the phone to boot up once into Android before rebooting into bootloader and booting into TWRP. If those steps are followed, we will have a much better idea of where the problem occurs.
    3
    @Homeboy76
    The OP refers to TWRP 3.2.3-2
    But the links only show up to 3.2.3-1
    Has it been pulled off or the reference is wrong?

    Thanks
    BB
    You're right, I'll fix it. TWRP for Google Pixel XL
    Thank you!