[Guide] Root Pixel 4 XL Android 10 (Q)

Search This thread

mattwheat

Senior Member
Oct 25, 2012
1,144
581
BIRMINGHAM
@mattwheat
Woke up and saw what I had missed. lol
Glad you got it rooted:)

I was wondering why all your images were blue and not black like the Command Window.

Curious:
What worked for you, so other XDA members can benefit from it:
- Opening a Command prompt?
- Switching slots?
- What, exactly, did you do to resolve the problem?


Updating to the new version of platform tools. I think it was partially the cmd prompt the newer version of platform tools. I tried the newer platform tools in powershell didn't work then tried in cmd prompt and it worked. But I had been trying cmd prompt with the old tools and didn't work. Tried with new tools in powershell didn't work. So it was both cmd and new tools.
 

Lughnasadh

Senior Member
Mar 23, 2015
2,025
1,321
Google Nexus 5
Huawei Nexus 6P
I've just rooted my new Pixel4XL, the process went smoothly, but not passing Safety-net (i.e. ctsProfile is false)
I just got a brand new Pixel 4 XL yesterday and same for me. Patching the boot image and flashing to both slots went well but failing ctsProfile. Basic integrity passes.

Tested Magisk Hide (it's enabled), and it's working. Also cleared cache of Google Play Services.

Stock on June image and stock kernel.

Stable Magisk 20.4
 
Last edited:

Homeboy76

Senior Member
  • Aug 24, 2012
    2,574
    1,248
    Hi, is everyone still passing safetynet?
    No! :(
    I've just rooted my new Pixel4XL, the process went smoothly, but not passing Safety-net (i.e. ctsProfile is false)
    You're not alone!. :(
    Seems Google has reapplied their attestation shenanigans again. Likely a harbinger of things yet to come! ??
    Yup!. :eek:

    A temporary fix for passing safetynet is this Magisk module. I use the module's name as the link name for the post: hardwareoff_1.1.zip
     
    Last edited:
    • Like
    Reactions: Thaiban

    Top Liked Posts

    • There are no posts matching your filters.
    • 22
      Root Pixel 4 XL Android 10 (Q) Unlock/Lock Bootloader + Systemless ROOT
      Android Security Buletin-August 2020
      Pixel Update Bulletin—August 2020

      Introduction
      1. This Guide is for Pixel 4 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 4 XL'.
      2. This Guide also works for Pixel 4 owners: If, they download the Pixel 4 files.

      NEW
      1. Gpay not working? Try this.
      2. Tulsadiver's ADB Magisk Module Mod Installer has a LINUX instaler.
      3. The best instuctions on how to Pass SafetyNet, i've ever read.

      Update(s)
      1. Factory/OTA Images - 08/05
      2. Magisk Stable - Magisk-22.0 02/23
      3. Magisk Beta - Magisk-22.0 02/23
      4. Magisk Canary - Magisk-22001
      5. TWRP - twrp-3.5.0_10-1-coral.img/zip 01/02
      6. SafetyNet - SafetyNetFix v1.1.1 01/16
      7. SDK Platform-tools - r31.0.0 03/01
      8. Custom Kernels
        • No Updated Kernels
      9. Custom ROMs
        • Waiting

      Disclaimers
      1. I assume no responsibility for the malfunctioning/bricking of your phone.
      2. 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
      1. A Pixel 4 XL phone with an unlocked bootloader.
      2. The latest Android 10 (Q) Factory or OTA Image: "coral" for Pixel 4 XL
        1. Factory Image
        2. OTA Image
      3. Computer - With the latest SDK Platform-Tools: r31.0.0 installed.
        • Important: Update Platform Tools, regularly, for optimal performance.

      Other Guides

      Credits/Thanks/Recognitions
      1. @topjohnwu - Magisk Canary
      2. Those I may have, inadvertently, forgotten.

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

      1. Open a Command Prompt/Boot Fastboot Mode/Boot Recovery

        • Open Command Prompt on Computer
          1. Option 1 - Open File Explorer, click the platform-tools folder, press shift, right click, and select open command prompt here.
          2. 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.
          3. Notes:
        • Boot fastboot mode:
          • 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 fastboot

        • Enable Developer Options - Tap Settings > About phone > Build number 7 times or until you should see 'you are a Developer'.
        • Enable USB Debugging - Tap Settings > System > Advanced > Developer options >
          Enable USB Debugging.
        • Open a Command Prompt on your computer in the Platform-tools folder.
        • Boot fastboot mode on your phone (#1)
        • Connect the phone to the Computer.
        • At the prompt type: fastboot devices to verify communication with phone. It should return your phone's serial number.
      3. Unlock Bootloader/Return Phone to Stock/Lock Bootloader

        • Unlock Bootloader

          1. This will erase all user data from the device!
          2. Backup your data
          3. Activate Developer Options: Tap Settings > About Phone > Tap Build Number 7 times or until you see you are a Developer. Tap back > System > Advanced > Developer Options. Enable OEM Unlock and, USB Debugging.
          4. Boot fastboot mode
          5. Connect the phone to the Computer with USB cord.
          6. Open a Command Prompt on your computer and type fastboot flashing unlock and press enter.
          7. You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
          8. Allow the process to complete and then type fastboot reboot at the Command Prompt and press enter.
          9. When your phone reboots disconnect your usb cable.
          10. Note: After unlocking your bootloader, you'll see a warning: You will see this warning until, you relock the bootloader.
        • Return Phone to Stock

          1. Important: Do not relock your bootloader until you have returned the device to Stock..
          2. Backup your data/Internal storage
          3. Settings > System > Advanced > Reset Options > Erase all data (factory reset)
          4. Log in
          5. Set up phone
        • Lock Bootloader (Google Pixel 4 XL)

          1. Return the phone to Stock before Locking the bootloader!
          2. This will erase all user data from the device!
          3. Boot fastboot mode
          4. Open a Command Prompt and type this at the Prompt: fastboot flashing lock
          5. You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
          6. Allow the process to complete, then type this at the Command Prompt: fastboot reboot
          7. Enable Developer Options: Settings > About phone > Tap Build number 7 times or until you see 'you are a developer'.
          8. Tap Back > Developer options and toggle OEM Unlock off.


      4. Install/Update Factory Image keep or wipe data

        • Important Note(s):
          1. When doing a major upgrade i.e., Android 10 (Q) to Android 11 (R): I recommend doing a clean install. What is a clean install?:
            • Doing a Factory reset prior to installing, major, update.
            • Using flash-all.bat file without removing the -w.
          2. Always verify you have the latest version of SDK Platform-Tools installed on your computer before installing the Factory Image: Pixel 4 XL - coral.
          3. If your phone is rooted and you have Modules installed and you want to 'Keep Data', remove them before you install the Factory Image:
            Why? Some Modules need to be updated before use with a new Factory/OTA image because (sometime) Google makes changes to Factory/OTA images that break the Modules.
          4. How to remove Magisk: Open Magisk App ==> Tap Uninstall == Tap Restore Images.
          5. If you get an error: when flashing the Factory image, try one of these options:
            • Change the USB port to a non charging USB port.
            • Change the USB cord to one that doesn't have the blue color head or use a USB C to C cable.
            • Change Computers.
        • Backup your data
        • Download the latest Factory Image: Pixel 4 XL - coral to your Computer.
        • Extract the factory Image to a folder.
        • Keep Data

          1. Open the folder you extracted the Factory Image to and Edit the flash-all.bat file with a file editor i.e. Notepad. Remove -w from this command: fastboot -w update image-coral-aa9a.999999.999.zip
            Note: If you do not remove the -w your data and internal storage will be wiped.
          2. After, you have edited the flash-all.bat file. Copy/Move these files to the Platform-tools folder:
            • bootloader-coral-....img
            • flash-all.bat
            • image-coral-....zip
            • radio-coral-....img
          3. Open a Command Prompt on your computer in the Platform-tools folder ==> Boot fastboot mode on your phone ==> Connect the phone to the Computer.==> At the prompt type: flash-all and press enter.
          4. Note: During the flashing you may notice the phone is in fastbootd mode that is a normal for Android 10 (Q).
          5. System will reboot when flashing is complete.
          6. Do #7 or #8 to root/reroot.
        • Wipe Data

          1. Open the folder you extracted the Factory Image to and View the flash-all.bat file with a file editor i.e. Notepad. Verify the file has the -w in this command: fastboot -w update image-crosshatch-aa9a.999999.999.zip
            Note: This will wipe your data and internal storage.
          2. Copy/Move these files to the Platform-tools folder:
            • bootloader-coral-....img
            • flash-all.bat
            • image-coral-....zip
            • radio-coral-....img
          3. Open a Command Prompt on your computer in the Platform-tools folder ==> Boot fastboot mode on your phone ==> Connect the phone to the Computer.==> At the prompt type: flash-all and press enter.
          4. Note: During the flashing you may notice the phone is in fastbootd mode that is a normal for Android 10 (Q).
          5. System will reboot when flashing is complete.
          6. Do #7 or #8 to root/reroot.
      5. ADB Sideload

        • Stock Recovery
        • Custom Recovery - TWRP

          • Important notes:
            1. Charge your device.
            2. Enable USB Debugging on your phone.
            3. Install the latest version of SDK Platform-tools on your computer.
          • Open a command prompt in the computer's ADB folder: the folder with ADB.exe in it.
          • Put the (flashable zip) file you want to sideload in the computer's ADB folder.Copy the Zip file you want to install on your device to the ADB folder.
          • Connect your device to your computer using a USB cable.
          • Boot T.W.R.P.
            1. T.W.R.P installed: Boot fastboot mode ==> use volume buttons up/down until you see Recovery mode ==> press power botton.
            2. T.W.R.P. not installed: Boot T.W.R.P: Put twrp.img file in the computer's ADB folder ==> open a command prompt in ADB folder ==> at the prompt type fastboot flash boot "Name of twrp file.img" without the quotation marks.
          • When T.W.R.P boots tap Advanced ==> ADB Sideload.
          • ✓ the wipe Dalvik cache box
          • Swipe to start
          • On your Computer: Enter the following command at the command prompt. adb sideload <filename.Zip> i.e., adb sideload myfile.zip
          • You will see the progress of the sideloaded file.
          • When the file finishes sidloading, reboot your device.
          • Done!
      6. Extract/Flash boot.img

        • Extract boot.img

          1. Download the latest Factory image to your phone.
          2. Use a File Explorer to extract the boot.img from the Factory Image.
          3. Extract the Factory Image file (coral-pda1a.999999.999-factory-99a9a99a.zip) to a folder.
          4. Open the folder and, extract the Image file (image-crosshatch-aa9a.999999.999.zip).
        • Flash boot.img

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

        • Important Note(s):
          1. Set Pin before installing TWRP: Settings > Security & location >Screen lock > Pin
          2. Backup your data
        • Download files - The listed files are used with #7, and #8.
          1. T.W.R.P
          2. Magisk - Download to your phone
          3. Custom Kernels - Download to your phone
            • No Updated Custom Kernels
          4. Kernel Manager - Download to your phone
        • Boot fastboot mode
        • Connect the phone to the Computer with USB cord.
        • Copy twrp-3.5.0_10-1-coral.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: fastboot boot twrp.img and press enter.
        • When TWRP boots, disconnect the phone from computer.
        • If requested, swipe to allow modifications.
        • Tap Install select twrp-installer-3.5.0_10-1-coral.zip, Swipe Slider to install
        • Reboot Recovery
        • Root/Reroot

          1. Note(s):
            • If you are rerooting, tap Install, select Magisk's uninstaller.zip, Swipe the slider to install.
            • Some Custom Kernels can be updated by flashing via Kernel Manager without losing root. Check the Custom Kernel thread (OP - Installation/Instructions) to find out which Custom Kernels.
          2. With Custom Kernel (Optional)
            • No Updated Custom Kernels
          3. Without Custom Kernel
            • Tap Install, select Magisk-Beta/Canary/Stable zip.
            • Swipe Slider to Install
            • Reboot System
            • Install Modules (Optional)
      8. Boot T.W.R.P./Root/Reroot with Magisk and Pass SafetyNet.

        • Backup your data
        • Download files - See #7 - Skip the twrp-installer
        • Boot fastboot mode
        • Connect the phone to the Computer with USB cord.
        • Copy twrp-3.5.0_10-1-coral.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: fastboot boot twrp.img and press enter.
        • When TWRP boots, disconnect the phone from computer.
        • If requested, swipe to allow modifications.
        • Root/Reroot

          • Note: If you are rerooting, tap Install, select the latest Magisk's uninstaller.zip, Swipe the slider to install.
          • With Custom Kernel (Optional)
            • No Updated Kernels
          • Without Custom Kernel
            • Tap Install, select Magisk-Beta/Canary/Stable zip.
            • Swipe Slider to Install
            • Reboot System
            • Install Modules (Optional)
      9. Root/Reroot with Magisk and Pass SafetyNet.

        • Important Note(s):
          1. When doing a major upgrade i.e., Android 10 (Q) to Android 11 (R): I recommend doing a clean install. What is a clean install?:
            • Doing a Factory reset prior to installing, major, update.
            • Using flash-all.bat file without removing the -w.
          2. To root use Magisk App Beta, Canary or Stable App to patch the Stock boot.img.
        • Download files:
          1. Magisk App - Download to your phone
          2. Custom kernels - Download to your phone - install with Kernel Manager
            • No updated Kernels
          3. Kernel Manager - Download to your phone
        • Patching the boot.img

          1. Do #6 - Extract boot.img
          2. Install Magisk (Beta or Canary) App
          3. Open Magisk App
          4. Depending on the version of Magisk App installed: Set the Update Channel to Beta, Canary or Stable.
          5. Tap Install (next to Magisk)
          6. Tap, Select and Patch a File
          7. Select the boot.img file you extracted from the latest factory image.
          8. Tap the ✓ (Check Mark)
          9. Tap Let's Go
          10. When you see done, the boot.img has been patched (magisk_patched_xxxxxx.img) and stored in the download folder.
          11. The phone will reboot.
          12. Copy the magisk_patched.img file to your computer's Platform-tools folder or the folder that has fastboot.exe in it.
          13. Boot fastboot mode (See #1B)
          14. Connect the phone to the Computer with USB cord.
          15. Open a Command Prompt (See #1A) in the folder you copied the magisk_patched.img to.
          16. Type fastboot flash boot magisk_patched.img at the Prompt and press enter.
          17. Type fastboot reboot at the Prompt and press enter.
          18. Important Notes: If your phone boot loops try one of the following options:
            • Flash the 'stock' boot.img to both slots: fastboot flash boot boot.img --slot all
            • Boot Safe Mode - Press Power Off button ==> Press Power Off until you see boot Safe Mode ==> Press Ok.
          19. Pass SafetyNet: #12 Apps/Mods/Scripts/Tethering/Themes
        • OTA Installation - Keep Root -- No Computer Needed
      10. Set Magisk App Update Chanel/Update Magisk

        • Set Magisk App Update Chanel

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

          1. When Magisk App 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!
      11. Custom ROMs for Pixel 4 XL

        • Need help with a Custom ROM?
          1. Follow the Installation Instructions of the Developer of the Custom ROM you are trying to install.
          2. If you have a problem Installing the ROM, Search the thread of the Custom ROM you want to install for solutions to problem before posting a request for help on their thread.
        • Custom ROMS
          1. Alpha/Beta

            • Waiting...
          2. Official

            • Waiting...
          3. Unofficial

            • Waiting...
      12. Apps/Mods/Scripts/Tethering/Themes
      13. T.W.R.P. 3.5.0_10-1 Backup/Restore
      2
      My apologies. I certainly was not trying to impugn your knowledge base or technique. I simply missed the SS for the CMD is all. I really don't know what the problem could be since both of the commands that have been discussed, work for myself and others. I suppose the work around would be to fastboot the boot.img, switch slots, then fastboot it again. However, I'm sure that won't mitigate your frustration as to why it doesn't work. I do like the "Vincent Price" retaliation technique though!

      done!!!!!!!!!!!! thank god thank you sir thank you very much that worked
      1
      Great write up...as always. Is there an way to update security patches and keep root?
      1
      Great write up...as always. Is there an way to update security patches and keep root?

      Not really if you use factory images.

      https://forum.xda-developers.com/pixel-4-xl/how-to/november-factory-images-t3997383/post80784067
      1
      Hi, is everyone still passing safetynet?
      No! :(
      I've just rooted my new Pixel4XL, the process went smoothly, but not passing Safety-net (i.e. ctsProfile is false)
      You're not alone!. :(
      Seems Google has reapplied their attestation shenanigans again. Likely a harbinger of things yet to come! ??
      Yup!. :eek:

      A temporary fix for passing safetynet is this Magisk module. I use the module's name as the link name for the post: hardwareoff_1.1.zip
    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