[GUIDE] Pixel 5 "redfin": Unlock Bootloader, Update, Root, Pass SafetyNet

Search This thread

cubandanger05

Senior Member
Dec 22, 2009
528
167
OnePlus 5T
Google Pixel 5
I've had a rooted Pixel 5 for a while, suddenly whilst using it, it rebooted and now it's stuck constantly refreshing at the bootloader is unlocked screen. I'm confused what could of caused this. I was still on android 11 at the time. Is there anything I can do to recover my data or stop it?
You know this happened to me on 12. Phone would randomly go into a bootloop. I don't know what the screen is called but it's the one when you first boot the phone and you get the option to pause the booting process. The only ways I found I could stop it was to plug the charger to it then hold the power button as it was bootlooping and that made it stop. Don't know what causes it.
 

V0latyle

Forum Moderator
Staff member
You know this happened to me on 12. Phone would randomly go into a bootloop. I don't know what the screen is called but it's the one when you first boot the phone and you get the option to pause the booting process. The only ways I found I could stop it was to plug the charger to it then hold the power button as it was bootlooping and that made it stop. Don't know what causes it.
I would suggest reflashing the boot image. Try unpatched first to see if it corrects the issue. If it only happens with a patched image, you are probably using the wrong version of Magisk.
 

cubandanger05

Senior Member
Dec 22, 2009
528
167
OnePlus 5T
Google Pixel 5
I would suggest reflashing the boot image. Try unpatched first to see if it corrects the issue. If it only happens with a patched image, you are probably using the wrong version of Magisk.
Thank you. I am still rocking magisk 23001, which may well be the culprit. It hasn't happened again after I removed a couple of patches I didn't use, but will definitely try the latest magisk on June's update and see.
 

V0latyle

Forum Moderator
Staff member
Thank you. I am still rocking magisk 23001, which may well be the culprit. It hasn't happened again after I removed a couple of patches I didn't use, but will definitely try the latest magisk on June's update and see.
You cannot use a lower version of Magisk than 23016 on Android 12. But yes, Stable 24.3 should work fine. Not sure if it works for delta OTAs though. I personally use the latest Canary.
 

DroidRommer

Senior Member
Aug 12, 2016
95
45
Hello all! Sorry if this question has already been answered but I was wondering if anyone has tried to root lineage 19.1 on pixel 5 (redfin)
Thank you so much,
DroidRommer
 

Homeboy76

Senior Member
Aug 24, 2012
3,271
1,802
Google Pixel XL
Last edited:
  • Like
Reactions: V0latyle

Regys

Senior Member
Sep 10, 2012
197
10
Hi,

I come to ask if the root is still ok. nothing change we can do root as usual ?
 

AquilaDroid

Senior Member
Oct 11, 2012
755
728
81
Raleigh, NC
I updated to June the way I always have:
  • Patched new boot image in Magisk
  • Reboot to bootloader
  • Flash bootloader and radio
  • Reboot to bootloader
  • Dirty flash factory image (--skip-reboot --slot=all)
  • Flash patched boot image to both slots
  • Reboot; update complete.
Any things I need to be aware of flashing this over January Android 12 Beta 2 build? Thanks for your continued support!
 

V0latyle

Forum Moderator
Staff member
No, still on the Android 12 beta which I had to install to get out of a mess that you helped me with back in January (see post #128).
Oh, okay. You should be able to update to the latest release using the method of your choice. I would personally recommend dirty flashing the factory image.
 
  • Like
Reactions: AquilaDroid

nalpo

Member
Jun 4, 2021
9
3
  1. Before you download the OTA, open Magisk, tap Uninstall, then Restore Images. If you have any Magisk modules that modify system, uninstall them now.
  2. Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update
  3. Allow the update to download and install. DO NOT REBOOT WHEN PROMPTED. Open Magisk, tap Install at the top, then Install to inactive slot. Magisk will then reboot your device.
  4. You should now be updated with root.
Hi there,

first of all, thanks for your work! I tried updating OTA with your suggestion, updated magisk first to v. 25101 and then followed your steps. After rebooting it seems that I lost root now. Do you have any advice on how to fix it? I still have the old, flashed boot.img available, if that helps.
 

V0latyle

Forum Moderator
Staff member
Hi there,

first of all, thanks for your work! I tried updating OTA with your suggestion, updated magisk first to v. 25101 and then followed your steps. After rebooting it seems that I lost root now. Do you have any advice on how to fix it? I still have the old, flashed boot.img available, if that helps.
Did you reboot through Magisk, or did you select Reboot now after installing the OTA update?

You should be able to temporarily boot an older patched boot image:
fastboot boot <Magisk patched boot image>
Then perform Direct Install in Magisk.
 

nalpo

Member
Jun 4, 2021
9
3
Thanks for ypur quick answer :).
I rebooted using Magisk. Rebooting using fastboot worked and I could install root with Magisk and reboot. Zygisk was not installed and the phone now wants to have the OTA update again, hm.
 

V0latyle

Forum Moderator
Staff member
Thanks for ypur quick answer :).
I rebooted using Magisk. Rebooting using fastboot worked and I could install root with Magisk and reboot. Zygisk was not installed and the phone now wants to have the OTA update again, hm.
Did you patch inactive slot in Magisk before you rebooted?

Check your current firmware (swipe notifications all the way down, it'll be right under the quick settings). Current is SQ3A.220605.009.A1. It's possible that the device rebooted to the "old" slot.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Keep telling you, my method never fails 🙃
    Your point is moot. I've always used the factory image as well, although I don't disable dm-verity or vbmeta verification, and I've never had any issues.

    The majority of issues with updating seem to be associated with the OTA, and since many users still prefer to update that way, I posted the notice.
    2
    Your point is moot. I've always used the factory image as well, although I don't disable dm-verity or vbmeta verification, and I've never had any issues.

    The majority of issues with updating seem to be associated with the OTA, and since many users still prefer to update that way, I posted the notice.
    +1, been on A12 for a little over a month. Same method I used for A11 has worked for me. I always choose to manually update using factory image. Worked great from June to July build.
    Thank you for the great guide, my friend!
    1
    It's right there...
    1657541185132.png

    Here's the link for the image: 12.1.0 (SQ3A.220705.003.A1, Jul 2022
    But I get every day an OTA update message on my phone.
    Current build: SP2A.220505.002
    You're on the May update. 220505 = Year 2022, Month 05, Day 05....although they've been using 05 since November, even though the firmware hasn't always been released on the 5th of the month. It's typically the first Monday, sometimes Tuesday.
    1
    Are you guys using Magisk beta or Magisk canary?
    And which do you prefer.

    I've been using canary, but I've considered switching up for beta 25.2
    However, canary has everything that beta does, so is it worth it?

    Also how would I switch?
    Uninstall Magisk, in the Magisk app, uninstall the app, reboot
    Install Magisk beta 25.2, patch and flash the kernek?

    Thank you, sorry if this is a bit off key.
    I've been using Canary.

    Switching from beta to canary is as simple as installing the app. However, since canary is usually a newer version than the beta (current 25201 vs 25200), you'd need to uninstall Canary, then install Beta. If you want to re-patch the kernel with Beta, then you'd need to perform a complete uninstall within Magisk, then boot with a rooted image and perform Direct Install once you've installed the beta. However, it's not really necessary to re-patch the kernel if it's working.

    Alternatively, you could change the update channel in Canary to Stable or Beta, which means you wouldn't get an update until there's a new release on those channels. This would probably be the cleanest and most foolproof way to do it.
    1
    I've been using Canary.

    Switching from beta to canary is as simple as installing the app. However, since canary is usually a newer version than the beta (current 25201 vs 25200), you'd need to uninstall Canary, then install Beta. If you want to re-patch the kernel with Beta, then you'd need to perform a complete uninstall within Magisk, then boot with a rooted image and perform Direct Install once you've installed the beta. However, it's not really necessary to re-patch the kernel if it's working.

    Alternatively, you could change the update channel in Canary to Stable or Beta, which means you wouldn't get an update until there's a new release on those channels. This would probably be the cleanest and most foolproof way to do it.
    Thank you my good Sir.
    I believe I'll stick with the Canary.
    Everything is working wonderfully, though I may need to do a factory reset for the August factory image because Now Playing just won't download the database fully.. it still does find songs.. sometimes, others I need to manually hit the lock screen icon, but it's very annoying to say the least.
    I also pulled a very noob move and disabled all trackers in the Warden app without backing them up, thus some apps aren't sending me notifications anymore.
    Sorry for the last off topic things, just angry that I goofed lol.
  • 15
    If you are looking for my guide on a different Pixel, find it here:
    Update 6-20-22: Magisk 25.1 is recommended as this includes fixes for OTA updates.
    Discussion thread for migration to 24.0+.

    DO NOT use any version of Magisk lower than Canary 23016 as it does not yet incorporate the necessary fixes for Android 12 and your device.


    WARNING: YOU AND YOU ALONE ARE RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR DEVICE. THIS GUIDE IS WRITTEN WITH THE EXPRESS ASSUMPTION THAT YOU ARE FAMILIAR WITH ADB, MAGISK, ANDROID, AND ROOT. IT IS YOUR RESPONSIBILITY TO ENSURE YOU KNOW WHAT YOU ARE DOING.

    Prerequisites:


    Android Source - Setting up a device for development


    1. Follow these instructions to enable Developer Options and USB Debugging.
    2. Enable OEM Unlocking. If this option is grayed out, unlocking the bootloader is not possible.
    3. Connect your device to your PC, and open a command window in your Platform Tools folder.
    4. Ensure ADB sees your device:
      Code:
      adb devices
      If you don't see a device, make sure USB Debugging is enabled, reconnect the USB cable, or try a different USB cable.
      If you see "unauthorized", you need to authorize the connection on your device.
      If you see the device without "unauthorized", you're good to go.
    5. Reboot to bootloader:
      Code:
      adb reboot bootloader
    6. Unlock bootloader: THIS WILL WIPE YOUR DEVICE!
      Code:
      fastboot flashing unlock
      Select Continue on the device screen.

    1. Install Magisk on your device.
    2. Download the factory zip for your build.
    3. Inside the factory zip is the update zip: "device-image-buildnumber.zip". Open this, and extract boot.img
    4. Copy boot.img to your device.
    5. Patch boot.img with Magisk: "Install" > "Select and Patch a File"
    6. Copy the patched image back to your PC. It will be named "magisk_patched-23xxx_xxxxx.img". Rename this to "master root.img" and retain it for future updates.
    7. Reboot your device to bootloader.
    8. Flash the patched image:
      Code:
      fastboot flash boot <drag and drop master root.img here>
    9. Reboot to Android. Open Magisk to confirm root - under Magisk at the top, you should see "Installed: <Magisk build number>

    1. Before you download the OTA, open Magisk, tap Uninstall, then Restore Images. If you have any Magisk modules that modify system, uninstall them now.
    2. Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update
    3. Allow the update to download and install. DO NOT REBOOT WHEN PROMPTED. Open Magisk, tap Install at the top, then Install to inactive slot. Magisk will then reboot your device.
    4. You should now be updated with root.

    1. Download the OTA.
    2. Reboot to recovery and sideload the OTA:
      Code:
      adb reboot sideload
      Once in recovery:
      Code:
      adb sideload ota.zip
    3. When the OTA completes, you will be in recovery mode. Select "Reboot to system now".
    4. Allow system to boot and wait for the update to complete. You must let the system do this before proceeding.
    5. Reboot to bootloader.
    6. Boot the master root image (See note 1):
      Code:
      fastboot boot <drag and drop master root.img here>
      Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
    7. Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
    8. Reboot your device. You should now be updated with root.
    Note: You can use Payload Dumper to extract the contents of the OTA if you want to manually patch the new boot image. However, I will not cover that in this guide.

    Please note that the factory update process expects an updated bootloader and radio. If these are not up to date, the update will fail.
    1. Download the factory zip and extract the contents.
    2. Reboot to bootloader.
    3. Compare bootloader versions between phone screen and bootloader.img build number
      Code:
      fastboot flash bootloader <drag and drop new bootloader.img here>
      If bootloader is updated, reboot to bootloader.
    4. Compare baseband versions between phone screen and radio.img build number
      Code:
      fastboot flash radio <drag and drop radio.img here>
      If radio is updated, reboot to bootloader.
    5. Apply update:
      Code:
      fastboot update --skip-reboot image-codename-buildnumber.zip
      When the update completes, the device will be in fastbootd. Reboot to bootloader.
    6. Boot the master root image (See note 1):
      Code:
      fastboot boot <drag and drop master root.img here>
      Note: If you prefer, you can manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
    7. Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
    8. Reboot your device. You should now be updated with root.
    Note: If you prefer, you can update using the flash-all script included in the factory zip. You will have to copy the script, bootloader image, radio image, and update zip into the Platform Tools folder; you will then have to edit the script to remove the -w option so it doesn't wipe your device.
    The scripted commands should look like this:
    Code:
    fastboot flash bootloader <bootloader image name>
    fastboot reboot bootloader
    ping -n 5 127.0.0.1 > nul
    fastboot flash radio <radio image name>
    fastboot reboot bootloader
    ping -n 5 127.0.0.1 > nul
    fastboot update  --skip-reboot --slot=all <image-device-buildnumber.zip>
    Once this completes, you can reboot to bootloader and either boot your master patched image, or if you patched the new image, flash it at this time.

    PixelFlasher by @badabing2003 is an excellent tool that streamlines the update process - it even patches the boot image for you. Please note that root access is required to patch.
    1. Download PixelFlasher and the factory image. You do not need to extract the factory image.
    2. Open PixelFlasher. Point the Android Platform Tools directory (browse for your Platform Tools folder)
    3. Point the Factory Image directory to the factory image package you just downloaded.
    4. Connect your device via USB. Ensure it shows up under ADB Connected Devices.
    5. Click the button to the right of the factory image Browse button (looks like a meat grinder). This will extract the boot image from the factory package.
    6. When the boot image appears in the list, click on it and click Patch. A root request should pop up on your device; this is PixelFlasher requesting shell root access through ADB. Make sure you approve it.
    7. PixelFlasher will automatically copy the boot image to your device, patch it in Magisk, then copy it back to your PC. The patched image should now appear in the boot image list.
    8. Select the patched boot image, the desired flash mode (Keep Data), and click Flash Pixel Phone.
    9. Pixel Flasher will automatically update bootloader, radio, system, then finally flash the patched boot image.
    10. When your device boots, you should be updated with root.

    1. Follow the instructions on the Android Flash Tool to update your device. Make sure Lock Bootloader and Wipe Device are UNCHECKED.
    2. When the update completes, the device will be in fastbootd. Reboot to bootloader.
    3. Boot the master root image (See note 1):
      Code:
      fastboot boot <drag and drop master root.img here>
      Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
    4. Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
    5. Reboot your device. You should now be updated with root.

    This is my configuration that is passing Safety Net. I will not provide instructions on how to accomplish this. Attempt at your own risk.

    Zygisk + DenyList enabled
    All subcomponents of these apps hidden under DenyList:
    • Google Play Store
    • GPay
    • Any banking/financial apps
    • Any DRM media apps
    Modules:
    To check SafetyNet status:
    I do not provide support for Magisk or modules. If you need help with Magisk, here is the Magisk General Support thread. For support specifically with Magisk v24+, see this thread.

    Points of note:
    • The boot image is NOT the bootloader image. Do not confuse the two - YOU are expected to know the difference. Flashing the wrong image to bootloader could brick your device.
    • While the Magisk app is used for patching the boot image, the app and the patch are separate. This is what you should see in Magisk for functioning root:
      screenshot_20211218-194517-png.5486339
    • "Installed" shows the version of patch in the boot image. If this says N/A, you do not have root access - the boot image is not patched, or you have a problem with Magisk.
    • "App" simply shows the version of the app itself.
    • If you do not have a patched master boot image, you will need to download the factory zip if you haven't already, extract the system update inside it, then patch boot.img.
    • If you prefer updating with the factory image, you can also extract and manually patch the boot image if desired.
    • Some Magisk modules, especially those that modify read only partitions like /system, may cause a boot loop after updating. As a general rule, disable these modules before updating. You are responsible for knowing what you have installed, and what modules to disable.


    Credits:
    Thanks to @ipdev , @kdrag0n , @Didgeridoohan , and last but not least, @topjohnwu for all their hard work!
    6
    Magisk Canary was updated to 23016 last night. This includes a fix for the vbmeta header issue, meaning that disabling verity/verification should no longer be required, and we should be able to root as we did before. This needs testing, make sure you back up your data and photos before you try this!

    Q: "If verity/verification are disabled, do I need to enable them now?"
    A: No. The only thing you have to do is update to Magisk 23016.
    Q: "Will enabling verity/verification wipe my data?"
    A: No.

    I will be updating the OP to reflect this.
    4
    For those who are wondering, this is how I updated my Pixel 5 (and my wife's 5a):
    1. Download and extract the factory image
    2. Extract boot.img from the factory update image
    3. Copied boot.img to device, patched in Magisk, copied patched boot image back to update folder
    4. Reboot device to bootloader
    5. Apply update:
      Code:
      fastboot update device-image-buildnumber.zip
    6. Let device boot and finish update; reboot to bootloader
    7. Boot patched image:
      Code:
      fastboot boot magisk_patched-23016_xxxxx.img
    8. Open Magisk, tap Install, Direct Install, then reboot.
    9. Done.
    You can potentially save a couple steps by using --skip-reboot when applying the update, then simply rebooting to bootloader and flashing the patched boot image.

    Note: I manually patched the boot image because I didn't have a 23016 boot image handy.
    4
    For those who are wondering, this is how I updated my Pixel 5 (and my wife's 5a):
    1. Download and extract the factory image
    2. Extract boot.img from the factory update image
    3. Copied boot.img to device, patched in Magisk, copied patched boot image back to update folder
    4. Reboot device to bootloader
    5. Apply update:
      Code:
      fastboot update device-image-buildnumber.zip
    6. Let device boot and finish update; reboot to bootloader
    7. Boot patched image:
      Code:
      fastboot boot magisk_patched-23016_xxxxx.img
    8. Open Magisk, tap Install, Direct Install, then reboot.
    9. Done.
    You can potentially save a couple steps by using --skip-reboot when applying the update, then simply rebooting to bootloader and flashing the patched boot image.

    Note: I manually patched the boot image because I didn't have a 23016 boot image handy.
    Confirmed working

    Just applied January update like how I have always been doing on Android 11. This wouldn't be possible without Magisk version 23016
    4
    @TKruzze @V0latyle If you're using USNF it doesn't matter if you add the necessary gms components to the Deny listh. The module will always remove them since keeping them on the list will actually keep USNF from doing it's thing.

    For simple SafetyNet pass Universal SafetyNet Fix is all you need (and possibly MagiskHide Props Config if you need to spoof a device fingerprint).