FORUMS

[Guide] Pixel 4 XL Android 10 (Q) - Two ways to Root +

1,948 posts
Thanks Meter: 974
 
By Homeboy76, Senior Member on 4th November 2019, 12:44 AM
Post Reply Email Thread
[Guide] Pixel 4 XL Android 10 (Q) Two ways to Root + Unlock/Lock Bootloader + Systemless ROOT + Android Security Bulletin—March 2020

Intro
  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 correct files for their phone.
  3. This Guide is not for use with the Pixel, Pixel XL, Pixel 2, Pixel 2 XL, Pixel 3a, Pixel 3a XL or Pixel 3 XL phones.

Update(s):
  1. Factory/OTA Images - 03/02
    Google’s March Pixel Feature Drop adds Cards & Passes, Motion Sense play/pause, more
  2. Android 11 Developer Preview 2 - 03/18
  3. Magisk Stable - Magisk-20.3 03/28
  4. Magisk Beta - Magisk-20.4 03/23
  5. Magisk Canary - Magisk-20.x
  6. TWRP - Waiting for Android 10 T.W.R.P
  7. SDK Platform-tools - r29.0.6 02/01
  8. Custom Kernels
    1. Franken vQU14 02/03 or vRQ14.2 03/03 or vSM1.2 03/06
    2. Kirisakura v3.9.1 03/06
    3. Artemis 02/22
    4. ElementalX v1.05 03/05
    5. CleanSlate vQ1.4.4 03/03 vR2.4.3 03/22/
    6. fsociety v1.2.3 03/20
  9. Custom ROMs
    1. Scorpion v3.0 04/01
    2. Android Open Source Illusion Project vAlpha 03/15
    3. Pixel Dust 03/28
    4. Benzo ROM 02/08
    5. ABC ROM 03/12
    6. Dirty Unicorns v14.1 03/08
    7. Bliss v12.5 03/31

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 purchased from Google 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: r29.0.6 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
    1. 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.
    2. Boot fastboot mode:
      • Power off phone, press and hold the power and volume down buttons until you see Start.
    3. 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
    1. Enable Developer Options - Tap Settings > About phone > Build number 7 times or until you should see 'you are a Developer'.
    2. Enable USB Debugging - Tap Settings > System > Advanced > Developer options >
      Enable USB Debugging.
    3. Open a Command Prompt on your computer in the Platform-tools folder.
    4. Boot fastboot mode on your phone (#1)
    5. Connect the phone to the Computer.
    6. At the prompt type:
      Code:
      fastboot devices
      to verify communication with phone. It should return your phone's serial number.
  3. Unlock Bootloader/Return Phone to Stock/Lock Bootloader
    1. Unlock Bootloader (Google Pixel 4 XL)
      1. Backup your data
      2. 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.
      3. Boot fastboot mode
      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: You will see this warning until, you relock the bootloader.

        Important: Do not relock your bootloader until you have returned the device to Stock..
    2. 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
    3. Lock Bootloader (Google Pixel 4 XL)
      • Note: 'B' must be completed before performing this step!
      1. Boot fastboot mode
      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. Enable Developer Options: Settings > About phone > Tap Build number 7 times or until you see 'you are a developer'.
      6. Tap Back > Developer options and toggle OEM Unlock off.

  4. Install Factory Image keep or wipe data
    • IMPORTANT NOTES:
      1. Always verify you have the latest version of SDK Platform-Tools installed on your computer before installing the Factory Image: Pixel 4 XL - coral.
      2. If your phone is rooted and you have Modules installed, do ab or ac below (Stable version of Magisk) before you install the Factory Image:
        Why? Some Modules need to be updated before use with a new Factory/OTA image. Including the Module listed at #9. B. 1. I. 2. below because (sometime) Google makes changes to Factory/OTA images that break the Modules.
        1. If you hid Magisk Manager unhide it: Open Magisk Manager ==> Tap Menu == Settings ==> General ==> Reboot Phone.
        2. Deactivate or remove all modules: Open Magisk Manager ==> Tap Menu == Tap Modules ==> Uncheck each module to deactivate or press the delete button to delete each module ==> Reboot Phone (So the modules are deactivated/removed).
        3. Remove Magisk: Open Magisk Manager ==> Tap Uninstall == Tap Restore Images.
      3. If you get an error: when flashing, try one of these options:
        1. Change the USB port to a non charging USB port.
        2. Change the USB cord to one that doesn't have the blue color head or use a USB C to C cable.
        3. Change Computers.
    1. Backup your data
    2. Download the latest Factory Image: Pixel 4 XL - coral to your Computer.
    3. Extract the factory Image to a folder.
      1. 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:
          1. bootloader-coral-....img
          2. flash-all.bat
          3. image-coral-....zip
          4. radio-coral-....img
        3. Test fastboot - Open a Command Prompt on your computer in the Platform-tools folder (#1A) ==> Boot fastboot mode on your phone (#1B) ==> Connect the phone to the Computer.==> At the prompt type:
          Code:
          fastboot devices
          to verify communication with phone. It should return your phone's serial number.
        4. If it does return the phone's serial number, type
          Code:
          flash-all
          at the Command Prompt and press enter.
          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 #9 to root/reroot.
      2. 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:
          1. bootloader-coral-....img
          2. flash-all.bat
          3. image-coral-....zip
          4. radio-coral-....img
        3. Test fastboot - Open a Command Prompt on your computer in the Platform-tools folder (#1A) ==> Boot fastboot mode on your phone (#1B) ==> Connect the phone to the Computer.==> At the prompt type:
          Code:
          fastboot devices
          to verify communication with phone. It should return your phone's serial number.
        4. If it does return the phone's serial number, type
          Code:
          flash-all
          at the Command Prompt and press enter.
          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 #9 to root/reroot.
  5. ADB Sideload
    1. Stock Recovery
    2. Custom Recovery TWRP
      • Waiting for Android 10 T.W.R.P
  6. Extract/Flash boot.img
    1. 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).
    2. 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 your computer's platform-tools folder or to the folder that has fastboot.exe in it.
      2. Boot fastboot mode
      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. Install T.W.R.P./Root/Reroot with Magisk and Pass SafetyNet.
    • Waiting for Android 10 T.W.R.P
  8. Boot T.W.R.P./Root/Reroot with Magisk and Pass SafetyNet.
    • Waiting for Android 10 T.W.R.P)l
  9. Root/Reroot with Magisk and Pass SafetyNet.
    • Important Note: Before you switch versions of Magisk (Stable, Beta or Canary) you must first un-install Magisk (Open Magisk Manager ==> Tap Uninstall Tap Restore Image) because they are all signed with different keys.
    1. Download files:
      1. Magisk Manager - Download to your phone
        1. The latest Stable/Beta Magisk Manager from Magisk by topjohnwu
        2. The latest Canary Magisk Manager (app-release.apk) from [DEV] Magisk Canary Channel - Bleeding Edge Builds by topjohnwu
      2. Custom kernels - Download to your phone - install with Kernel Manager
        Note: To remove kernels Open Magisk, tap Uninstall, tap Restore Images. This will remove root by restoring back the stock boot.img and dtbo.img.
        1. [Kernel][March]FrankenKernel[P4][4.14.172] by*dabug123
        2. [Kernel][06.03.2020][4.14.172] Kirisakura_Q 3.9.1 for Pixel 4/XL aka FLORAL by*Freak07
        3. [KERNEL] [February 5] Pixel 4 ElementalX 1.04 by*flar2
        4. Artemis for Coral by KuranKaname
        5. [KERNEL] CleanSlate Q1.4.4 / R2.4.2 |S2S|Squeeze|KCal|KAdaway|VIB|WireGuard [Mar3] by*tbalden
        6. [KERNEL][[4.14.173][03/20/2020][stable# 1.2.3]fsociety for Google Pixel 4/XL by*wrongway213
      3. Kernel Managers - Download to your phone
        1. EX Kernel Manager
        2. FK Kernel Manager
    2. Two Ways to Root/Reroot with Magisk
      1. Patch Boot Image
        1. Do #6A 'Extract boot.img"
        2. Install Magisk Manager
        3. Before you patch the boot.img, Open Magisk Manager, tap Advanced Settings, and uncheck Recovery Mode. CAUTION: If Recovery Mode is not unchecked it may cause boot loops when you flash the magisk_patched.img. Thanks @Madjax2020
        4. Tap Menu ==> Settings ==> Update Channel ==> Set the channel to the channel that matches the Magisk Manager (Stable, Beta or Canary) you downloaded.
        5. Tap back and Press Install ==> Press Install again ==> Select Patch a File ==> Select the boot.img file you extracted from the latest factory image
        6. Magisk Manager will patch the boot.img and store the patched boot.img in the download folder.
        7. Copy the magisk_patched.img file to your computer's Platform-tools folder or the folder that has fastboot.exe in it.
        8. Boot fastboot mode (See #1B)
        9. Connect the phone to the Computer with USB cord.
        10. Open a Command Prompt (See #1A) in the folder you copied the magisk_patched.img to.
        11. Type
          Code:
          fastboot flash boot --slot all magisk_patched.img
          at the Prompt and press enter.
        12. Reboot System
          Important Note: If your phone boot loops try one of the following:
          1. Flash the 'stock' boot.img to both slots:
            Code:
            fastboot flash boot --slot all boot.img
          2. [Guide] Magisk Modules Disabler for booting into Magisk core-only Mode by*Tulsadiver
      2. Flash Magisk zip
        • Flash the latest Magisk Stable, Beta or Canary via Kernel Manager.
    3. OTA Installation - Keep Root -- No Computer Needed
  10. Set Magisk's Update Chanel/Update Magisk
    • Important Note: "If you have the stable or beta version installed, you must first un-install the Magisk Manager (Open Magisk Manager ==> Tap Uninstall) before you can install the Canary version, because they are signed with different keys".
    1. Set Magisk's Update Channel
      1. Stable/Beta
        • Open Magisk Manager > Tap menu icon > Settings > Update Channel > Select Stable or Beta
      2. Custom
        1. Open Magisk Manager ==> Tap menu icon ==> Settings ==> Update Channel ==> Select Custom:
        2. Copy the URL of the Magisk Canary version you want and paste it on the Insert a Custom URL line:
          • Canary - Release Channel:
            Code:
            https://bit.ly/2N8UVlq
          • Canary - Debug Channel:
            Code:
            https://bit.ly/2MPKGY5
    2. 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!
  11. Custom ROMs for Pixel 4 XL
    • Need help with a Custom ROM?
      1. First, follow the Installation Instructions of the Developer of the Custom ROM you are trying to install.
      2. 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.
    1. Alpha/Beta
    2. Official
      • Waiting . . .
    3. Unofficial
  12. Apps/Mods/Scripts/Tethering/Themes
  13. Other: T.W.R.P. Backup/T.W.R.P Update
The Following 17 Users Say Thank You to Homeboy76 For This Useful Post: [ View ] Gift Homeboy76 Ad-Free
4th November 2019, 08:46 PM |#2  
Senior Member
Thanks Meter: 55
 
More
Great write up...as always. Is there an way to update security patches and keep root?
4th November 2019, 10:05 PM |#3  
Badger50's Avatar
Forum Moderator
Flag Kansas City
Thanks Meter: 7,777
 
More
Quote:
Originally Posted by State.of.mind

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/pix...3/post80784067
The Following User Says Thank You to Badger50 For This Useful Post: [ View ] Gift Badger50 Ad-Free
4th November 2019, 11:27 PM |#4  
troymz1's Avatar
Senior Member
Thanks Meter: 106
 
More
Edit: nevermind
5th November 2019, 09:36 PM |#5  
OP Senior Member
Thanks Meter: 974
 
More
Quote:
Originally Posted by Badger50

Not really if you use factory images.

https://forum.xda-developers.com/pix...3/post80784067

I guess it depends on what Factory Image information is needed.
5th November 2019, 11:33 PM |#6  
OP Senior Member
Thanks Meter: 974
 
More
Quote:
Originally Posted by State.of.mind

Great write up...as always. Is there an way to update security patches and keep root?

Thank you!
No, but look at # 9C
8th November 2019, 01:18 PM |#7  
Senior Member
Thanks Meter: 55
 
More
How do you know what November security patch to choose? When I go on the factory website there are three different versions of the update.

---------- Post added at 08:18 AM ---------- Previous post was at 08:15 AM ----------

Quote:
Originally Posted by State.of.mind

How do you know what November security patch to choose? When I go on the factory website there are three different versions of the update.

Never mind. I used this link to figure it out: https://support.google.com/pixelphon...18553639?hl=en Hopefully it helps someone else
11th November 2019, 09:22 PM |#8  
fredgar75's Avatar
Senior Member
Flag Jacksonville
Thanks Meter: 1,859
 
More
So this may be a dumb question but, does accepting an OTA relock the boot loader?
11th November 2019, 09:33 PM |#9  
OP Senior Member
Thanks Meter: 974
 
More
Quote:
Originally Posted by fredgar75

So this may be a dumb question but, does accepting an OTA relock the boot loader?

No, but you must be Stock to accept the OTA, unless you do the Magisk OTA Installation.
The Following User Says Thank You to Homeboy76 For This Useful Post: [ View ] Gift Homeboy76 Ad-Free
11th November 2019, 09:37 PM |#10  
OP Senior Member
Thanks Meter: 974
 
More
Quote:
Originally Posted by State.of.mind

How do you know what November security patch to choose? When I go on the factory website there are three different versions of the update.

---------- Post added at 08:18 AM ---------- Previous post was at 08:15 AM ----------



Never mind. I used this link to figure it out: https://support.google.com/pixelphon...18553639?hl=en Hopefully it helps someone else

I guess you didn't see the description of the Factory/OTA at the end of the download Factory/OTA links in 'Prerequisites'.
The Following User Says Thank You to Homeboy76 For This Useful Post: [ View ] Gift Homeboy76 Ad-Free
30th November 2019, 10:29 PM |#11  
Senior Member
Thanks Meter: 13
 
More
Will this work on the Verizon Pixel 4 XL??
Post Reply Subscribe to Thread

Tags
android 10, pixel 4 xl, reroot, root, unlock bootloader

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes