[Guide] Root Pixel 5 Android 11 (R)

Search This thread

sidhaarthm

Senior Member
Mar 1, 2009
406
85
London, U.K.
Is anyone else having issue rooting the March 2021 release using Magisk 22 or Canary 22001?

Not really. Trick is to use the latest Magisk v22 to patch your March boot image - before you actually begin the update to the March release on your phone. Once you flash the March update, simply flash this previously patched boot.img and you're good to go. At least this method worked for me.
 
  • Like
Reactions: Amd4life

SomeoneNew88

Member
Sep 3, 2019
27
3
Hi, I have brand new Pixel 5 (compilation nr is RQ2A.210305.006), yesterday I unlocked bootloader and I installed Magisk v22 next patched boot.img but when I want to flash it into my pixel I getting below information in adb:

target reported max download size of 268435456 bytes
sending 'boot' (98304 KB)...
OKAY [ 2.221s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 2.367s

Could you please give some tip how to solve it?
Thanks in advanced
 

Homeboy76

Senior Member
Aug 24, 2012
2,515
1,214
Hi, I have brand new Pixel 5 (compilation nr is RQ2A.210305.006), yesterday I unlocked bootloader and I installed Magisk v22 next patched boot.img but when I want to flash it into my pixel I getting below information in adb:

target reported max download size of 268435456 bytes
sending 'boot' (98304 KB)...
OKAY [ 2.221s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 2.367s

Could you please give some tip how to solve it?
Thanks in advanced
Do you have SDK Platform-tools r31.0.0 installed on your PC/Computer/Laptop?

Did you use the command:
fastboot flash boot magisk_patched_xxxxx.img?
(the xxxxx represent the alph numeric charaters following the patched_)
 
  • Like
Reactions: Amd4life

Amd4life

Senior Member
Dec 30, 2010
1,807
431
Do you have SDK Platform-tools r31.0.0 installed on your PC/Computer/Laptop?

Did you use the command:
fastboot flash boot magisk_patched_xxxxx.img?
(the xxxxx represent the alph numeric charaters following the patched_)

Yep that was it. I needed to update to R31. I wish we had a working TWRP lol
 

RBEmerson

Senior Member
Jul 15, 2012
582
59
SE PA
I think I'm out of luck with rooting my P5. It's the Google Store version (model GD1QY), which is, I assume, carrier agnostic. Fine. Then it should be possible to unlock the bootloader (it's currently locked).

Am I, in fact, out of luck with unlocking the bootloader? Obviously, if I am, well, there we are - no rooting.

The question, then, is: am I out of luck with this phone?
 

SomeoneNew88

Member
Sep 3, 2019
27
3
Do you have SDK Platform-tools r31.0.0 installed on your PC/Computer/Laptop?

Did you use the command:
fastboot flash boot magisk_patched_xxxxx.img?
(the xxxxx represent the alph numeric charaters following the patched_)

Yes you're right I installed r31 but i had mess on my computer, now I updated my system variables and delete old ADB's and everything works... I mean I unbrick my pixel ;D and now I can one more time try to Magisk him :p and flash patched boot file.
 

Homeboy76

Senior Member
Aug 24, 2012
2,515
1,214
Yes you're right I installed r31 but i had mess on my computer, now I updated my system variables and delete old ADB's and everything works... I mean I unbrick my pixel ;D and now I can one more time try to Magisk him :p and flash patched boot file.
Were you able to patch the boot.img and flash it?
 

RBEmerson

Senior Member
Jul 15, 2012
582
59
SE PA
I think I'm out of luck with rooting my P5. It's the Google Store version (model GD1QY), which is, I assume, carrier agnostic. Fine. Then it should be possible to unlock the bootloader (it's currently locked).

Am I, in fact, out of luck with unlocking the bootloader? Obviously, if I am, well, there we are - no rooting.

The question, then, is: am I out of luck with this phone?
Code:
PS G:\Pixel5\XDA\sdk> .\fastboot devices
09091FDD4006RD  fastboot
PS G:\Pixel5\XDA\sdk> .\fastboot flashing unlock
FAILED (remote: 'flashing unlock is not allowed')
fastboot: error: Command failed
PS G:\Pixel5\XDA\sdk>

The bottom line of the fastboot screen reads
Code:
Enter reason: combo key
That doesn't look encouraging. Now what?
 

Homeboy76

Senior Member
Aug 24, 2012
2,515
1,214
Code:
PS G:\Pixel5\XDA\sdk> .\fastboot devices
09091FDD4006RD  fastboot
PS G:\Pixel5\XDA\sdk> .\fastboot flashing unlock
FAILED (remote: 'flashing unlock is not allowed')
fastboot: error: Command failed
PS G:\Pixel5\XDA\sdk>

The bottom line of the fastboot screen reads
Code:
Enter reason: combo key
That doesn't look encouraging. Now what?
If you bought from a carrier or Bestbuy the bootloader is not unlockable.
 

RBEmerson

Senior Member
Jul 15, 2012
582
59
SE PA
If you bought from a carrier or Bestbuy the bootloader is not unlockable.
The phone is carrier agnostic. AFAIK the phone didn't come from BestBuy. The box has no obvious signs of a BB price sticker, etc. It was bought as an "open box" on eBay.

Model number GD1YQ appears to be the Google Store version.
 

badabing2003

Senior Member
Sep 17, 2012
328
88
> If you bought from a carrier or Bestbuy the bootloader is not unlockable.
This does not apply to all carriers, I bought mine from a carrier on a 2 year plan and unlocked the bootloader.
At least here in the North (Canada) carriers are not allowed to lock the phones.
 

Homeboy76

Senior Member
Aug 24, 2012
2,515
1,214
> If you bought from a carrier or Bestbuy the bootloader is not unlockable.
This does not apply to all carriers, I bought mine from a carrier on a 2 year plan and unlocked the bootloader.
At least here in the North (Canada) carriers are not allowed to lock the phones.
Not the same with U.S. carriers. :(
 

Elyey

Member
Jan 30, 2021
26
4
Excuse me, is this topic about root in stock ROM only?

After March 2021 release I can't get root on my custom ROM (Proton 11.3.3)
I tried Canary 21407(18), new Canary 22005(19) and new Magisk 22.
I get boot loop after "fastboot flash boot" and "fastboot flash boot --slot all" every time.

My bootloader is unlocked and I was getting root on older ROM (Proton 11.3.1 and LineageOS 18.1) successful
 

Homeboy76

Senior Member
Aug 24, 2012
2,515
1,214
Excuse me, is this topic about root in stock ROM only?

After March 2021 release I can't get root on my custom ROM (Proton 11.3.3)
I tried Canary 21407(18), new Canary 22005(19) and new Magisk 22.
I get boot loop after "fastboot flash boot" and "fastboot flash boot --slot all" every time.

My bootloader is unlocked and I was getting root on older ROM (Proton 11.3.1 and LineageOS 18.1) successful
Yes!
Missing something?
- fastboot flash boot magisk_patched_xxxxx.img
- fastboot flash boot --slot all boot.img
Suggestion: Post your questions on the Proton 11.3.1 and LineageOS 18.1 threads.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I've asked this question before, but no response.

    I am stock, rooted. I want to take the April update. Usually I follow the steps here and flash the full image (and then reroot), but can I not just the disable the magisk modules I have, uninstall magisk, take the OTA update, be unrooted again, and then root?

    Will that not work? Or do I HAVE to flash the full image update to update my phone?

    Thanks!
    1
    Would love to know that too. I read somewhere your described steps could lead to a boot loop somehow?

    There are so many different guides on how to update a rooted phone.
    Is there any easy step by step guide for this?
    1
    I've asked this question before, but no response.

    I am stock, rooted. I want to take the April update. Usually I follow the steps here and flash the full image (and then reroot), but can I not just the disable the magisk modules I have, uninstall magisk, take the OTA update, be unrooted again, and then root?

    Will that not work? Or do I HAVE to flash the full image update to update my phone?

    Thanks!

    (we have device with A/B partition)

    ---
    I can't say I've done either,
    but I don't see why you can't go ahead and uninstall Magisk, take OTA, then re-root. Which is more or less following non-A/B devices method,
    • "Apply the OTA and reboot your device. This will use the official stock OTA installation mechanism of your device to upgrade your system.
    • Once it's done you will be left with an upgraded, 100% stock, un-rooted device. You will have to manually flash Magisk back. Consider using the methods stated in step 1. to flash Magisk without touching the recovery partition if you want to receive stock OTAs frequently."
    1
    I\ll be honest. The first post confused me. I havent rooted anything before, just debloated with adb. If first post tutorial is too complicated for me, would this tutorial work https://www.getdroidtips.com/root-google-pixel-5-android-11/#Benefits-and-Risks-of-a-Rooted-Device ? Thank you :)
    If your bootloader is locked and you want to root do #3 Unlock bootloader, then do #4, then do #7 to root.
    If you are rooted do #4 'keep data' then do # 7 to reroot.
    1
    I've tried flashing the patched image twice now, ends up with a bootloop each time. I double checked that my device is on rq2a.210405.005 and I'm pulling the boot.img out of redfin-rq2a.210405.005-factory-ddb75a1f. I used Magisk V22.0. I did "fastboot flash boot magisk_patched_oLhvB.img" and watched it succeed. Not sure what I'm doing wrong here. Can someone idiot check me?
  • 14
    [Guide] Root Pixel 5 Android 11 (R) Unlock/Lock Bootloader + Systemless ROOT
    Android Security Bulletin—April 2021
    Pixel Update Bulletin—April 2021


    Introduction
    This Guide is for Pixel 5 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 5'.


    New


    Update(s)
    1. Factory/OTA Images - 04/05
    2. Magisk Stable - Magisk-22.1 04/09
    3. Magisk Beta - Magisk-22.1 04/09
    4. Magisk Canary - Magisk-221xx
    5. TWRP - [RECOVERY] TWRP 3.5.0_10-0 - TeamWin Recovery Project [REDFIN] [TESTING]
    6. SafetyNet - SafetyNetFix v1.1.1 01/16
    7. SDK Platform-tools - r31.0.2 April
    8. Custom Kernels
      • ElementalX vP5-1.00 11/17
      • CleanSlate vR1.8.1 03/07 S2.8.2 03/14
      • FrankenKernel vP5 02/04
      • Proton Kernel v1.2 04/15
      • Zest Kernel 02/21
    9. Custom ROMs
      • ProtonAOSP 11.4.0 04/15
      • Official Scorpion v4.3 03/09
      • Offical[Redfin] LineageOS 18.1 Weeklies


    Disclaimer
    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 5 phone with an unlocked bootloader.
    2. The latest Android 11 (R) Factory or OTA Image: "redfin" for Pixel 5
    3. Factory Image
    4. OTA Image
    5. Computer - With the latest SDK Platform-Tools: r31.0.2 installed.
      • Important: Update Platform Tools, regularly, for optimal performance.


    Other Guides
    [Guide] Pixel 4 XL Android 11 (R)


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


    Index
    (NOTE: Numbers 1-11 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.
          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.
      • Note: If you, still, cannot transfer files: Read Pixel 5 Not Detected By PC article - DMS100's post. :)
    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.
          Notes: After unlocking your bootloader, you'll see a warning: You will see this warning until, you relock the bootloader.
          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

        1. Return the phone to Stock before locking the bootloader, failure to do so could brick your phone
        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 5 - redfin.
        3. If your phone was rooted, and you want to 'Keep Data'. Do this first unhide Magisk App (if you hid it) then Uninstall Magisk - Restore Images prior flashing the Factory image. Why? The changes in the Factory image may cause Magisk modules to fail. This will cause boot loops.
        4. If you get an error: while flashing, 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.
          • Change Computers.
      • Backup your data
      • Download the latest Factory Image: Pixel 5 - redfin to your Computer.
      • Extract the factory Image to a folder.
      • Flash Factory Image Keep Data

        • Open the folder you extracted the Factory Image to and Edit the flash-all.bat file with a file editor i.e., Notepad. Remove the -w from this command: fastboot -w update image-redfin-aa9a.999999.999.zip
          Note: If you do not remove the -w your data and internal storage will be wiped.
        • After, you have edited the flash-all.bat file. Copy/Move these files to the Platform-tools folder:
          1. bootloader-redfin-....img
          2. flash-all.bat
          3. image-redfin-....zip
          4. radio-redfin-....img
        • Open a Command Prompt on your computer in the Platform-tools and type: flash-all at the Command Prompt and press enter.
        • System will reboot when flashing is complete.
        • Do #7 to root/reroot.
      • Flash Factory Image Wipe Data

        • This will wipe your phones Internal Storage.
        • Open the folder you extracted the Factory Image to and Copy/Move these files to the Platform-tools folder:
          1. bootloader-redfin-....img
          2. flash-all.bat
          3. image-redfin-....zip
          4. radio-redfin-....img
        • Open a Command Prompt on your computer in the Platform-tools folder and type: flash-all at the Command Prompt and press enter.
        • The phone will reboot when flashing is complete.
        • Do #7 to root/reroot.
    5. ADB Sideload

    6. Extract/Flash boot.img

      • Extract boot.img

        1. Download the latest Factory image to your phone.
        2. Extract the Factory Image file (redbfin-r2d1a.999999.999-factory-99a9a99a.zip) to a folder.
        3. Open the folder and, extract the Image file (image-redfin-aa9a.999999.999.zip) into the folder.
      • Flash boot.img

        1. Flashing the boot.img removes root.
        2. Open the folder you extracted the 'image...zip' 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:
          fastboot flash boot --slot all boot.img
        6. Reboot
    7. 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. If your phone was rooted Do this first unhide Magisk App (if you hid it) then Uninstall Magisk - Restore Images. Why? The changes in the Factory image may cause Magisk modules to fail. This will cause boot loops.
      • Download files:

        1. Magisk App - Download to your phone
        2. Custom kernels - Download to your phone - install with Kernel Manager
        3. Kernel Manager - Download to your phone
      • Patching the boot.img

        1. Do #6 - Extract boot.img
        2. Install Magisk (Beta, Canary or Stable) 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. Reboot the phone.
        12. Copy the patched boot.img file to your computer's Platform-tools folder or the folder that has fastboot.exe in it.
        13. Boot fastboot mode
        14. Connect the phone to the Computer with USB cord.
        15. Open a Command Prompt in the folder you copied the patched boot.img to.
        16. Type fastboot flash boot "name of patched boot".img without the quote marks 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.
      • Pass SafetyNet: MAGISK MODULE ❯ Universal SafetyNet Fix 1.1.0

        1. Download SafetyNetFix from the link above.
        2. Open Magisk Manager
          • Tap Modules icon.
          • Tap Install from storage
          • navigate to the SafetyNetFix file
          • Hightlight the file (tap it)
          • Tap the check mark (✓) to start the installation.
          • After it installs tap the Save icon to save the log
          • Tap Reboot.
        3. Open Magisk Manager
          • Tap the Setup icon.
          • Scroll down to Magisk - MagiskHide and enable it.
          • Tap back arrow => tap Superuser icon => tap MagiskHide => Scroll to the bottom of the page => Tap Search icon => Tap Show system apps (Under Filters) => check (✓): Google play services (com.google.android.gms).
          • Close Magisk Manager.
        4. Open Settings
          • Tap Apps & notifications
          • Tap see all 999 apps
          • Tap the three dot menu
          • Tap Show system
          • Scroll down to Google Play Store
          • Tap it
          • Tap Storage & cache
          • Tap Clear cache
          • Tap Clear storage
          • Exit settings
          • reboot
        5. Open Google Play Store app
          • Tap Menu
          • Tap Settings
          • Scroll down to Play protect certification
          • check for Device certification.
    8. Set Magisk App Update Chanel/Update Magisk

      • Set Magisk App Update Chanel

        • Open Magisk App > Tap Settings icon > 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/Download
        7. Tap, Reboot
        8. Done!
    9. Custom ROMs

    10. Apps/Mods/Scripts/Tethering/Themes
    11. T.W.R.P. Backup/Restore

      • Waiting for Android 11 (R) T.W.R.P.
    4
    is there a magisk boot img with modules disabled?. i have a boot loop and need a boot img with it disabled.
    You should have your stock image you can push over. I do not think replacing the boot image with another patched image would disable anything. You can also use adb to remove any modules. Regardless heres my patched boot image and the command to remove modules. Power off, connect phone enter this command, hold power button to boot phone.

    adb wait-for-device shell magisk --remove-modules

    Patched December build boot image
    here
    4
    For people who are having bootloops with patched boot.img
    Please pay attention to this step in the guide
    Section 7
    Under Patching boot.img
    4- Depending on the version of Magisk Manager installed: Set the Update Channel to Beta or Canary.

    Even if you install beta / canary magisk apk, if you don't select the matching channel, you'd get a bootloop, so don't forget that important step.
    3
    Hi and thanks for your guide!
    Could you please explain step by step how to update to December patch without loosing data and get back root after?

    I'm used to flashing and rooting with twrp on my pixel 2 xl but this is something different and I don't wanna wipe anything 😂

    I've followed this guide but they don't share the how to update to latest patch.


    Thanks 🙏
    Read #4 Important Notes 3. - Magisk
    Do #4 'Keep data' to flash Factory image
    Do #7 to reroot
    2
    But topjohnwu has posted on Twitter that's no longer working. Is it fixed in subsequent releases?

    Ok, time to update OP.
    If you take the OTA you will lose root.
    If you flash the Factory image you should uninstall Magisk to prevent possible bootloops due to conflict with modules. So you will lose root but preserve your data/Internal Storage #4 'Keep data'.

    The good news is it only takes a few moments to patch the boot.img and flash it to reroot. :)
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