• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Guide] Root Pixel 5 Android 12

Search This thread

elong7681

Senior Member
May 23, 2015
255
74
40
US
Moto X4
Google Pixel 2 XL
[Guide] Root Pixel 5 Android 11 (R) Unlock/Lock Bootloader + Systemless ROOT
Android Security Bulletin—September 2021
Pixel Update Bulletin—September 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
  1. Magisk Alpha (vvb2060)
    • If you are having problems with Magisk Beta, Canary, or Stable Passing SafetyNet try using Magisk Alpha (vvb2060).
    • Note(s):
      1. The Magisk General Support / Discussion has the latest information about Magisk Alpha (vvb2060).
      2. Read @pndwal last 10 post in the thread above that start with Latest @vvb2060 Magisk Alpha build... to get the latest Change Log for Magisk alpha: XDA app or Browser -> Tap Search this thread (at the top of the thread) -> Type alpha in the Search - box -> Scroll down -> Type pndwal in the Member - box.
    • How to Install Magisk alpha
      Credit for the instructions belong to XDA member @pndwal.
      1. Uninstall the old Magisk apk, but not Magisk
      2. Alpha app should be able to see your (old) Magisk
      3. Patch from Alpha apk and flash
    • Pass SafteyNet with Magisk alpha
      Credit for the instructions belong to XDA member @dewa5227:
      Credit for the instructions (additional note) belong to XDA member @pndwal:
      1. Toggle on the enforce denyList
      2. Click on Configure denyList
      3. Choose "Google Play Service" and checklist on "com.android.gms" and "com.android.gms.unstable"

        Should do the trick for safetynet. Hope it helps out with the Hysteria of magiskhide is no more.

        Nb. For devices where Magisk resides in /sbin (many pre. Android 11), only com.google.android.gms.unstable in Google Play Services is needed in hidelist / denylist.
    • Download Links
      1. alpha download - Github: Click View code -> Download and install: app-release.apk
      2. alpha download - Telegram: The latest version is at the bottom.
      3. Note: The latest Magisk alpha file is loaded to the telegram channel first. It takes a while before it is posted to Github.
  2. Android 12 Developer Preview - Beta 5

Update(s)
  1. Factory/OTA Images - 09/07
  2. Magisk Stable - Magisk-23.0 05/12
  3. Magisk Beta - Magisk-23.0 05/12
  4. Magisk Canary - Magisk-23xxx
  5. TWRP - [RECOVERY] TWRP 3.5.0_10-0 - TeamWin Recovery Project [REDFIN] [TESTING] - Test 8
  6. SafetyNet - SafetyNetFix v1.2.0
  7. SDK Platform-tools - r31.0.3 08/18
  8. Custom Kernels
    • ElementalX vP5-1.00 11/17
    • CleanSlate vR1.8.5 06/13 S (B5) 2.8.9 09/11
    • Proton Kernel v2.1 08/05
  9. OS
  10. Custom ROMs
    • ProtonAOSP v11.6.0 08/25
    • Official Scorpion v4.8 08/17
    • Offical[Redfin] LineageOS 18.1 Nightlies

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

    Factory Image

    OTA Image
  3. A Computer with the latest SDK Platform-Tools: r31.0.3installed.
    • Important: Update Platform Tools, regularly, for optimal performance.

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

Credits/Thanks/Recognitions
  1. @topjohnwu - Magisk Beta/Canary/Stable
  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 a Command Prompt on Computer
      1. Open File Explorer, click the platform-tools folder ==> click the folder icon (left side of address bar) to highlight it type cmd and press enter.
      2. Open a Powershell Command Prompt on Computer: Open File Explorer, click the platform-tools folder ==> click the folder icon (left side of address bar) to highlight it type powershell and press enter.
      3. Notes:
        • Enable USB Debugging, on your phone: Settings ==> System ==> Advanced ==> Developer options ==> Scroll down to USB debugging and enable it.
        • When using the Powershell Command Prompt Commands must be preceeded with ./: i.e, ./fastboot devices
        • If you do not want to open a Command Prompt every time you want to use the fastboot command, add the path to the Platform-tools folder to Windows environment variables.
    • Boot fastboot mode (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 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.
        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 open Magisk ==> unhide Magisk App (if you hid it) ==> Disable/Remove all modules ==> then Uninstall Magisk - Restore images prior flashing the Factory image. Why? The changes in the New factory image may cause Magisk modules to fail. This will cause boot loops. Additionally, before Enabling/Installing the modules you Disabled/Removed check with the Dev of the module to ensure it was updated to work with the latest factory image.
      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.
        • Change Computers.
      5. Backup your data
      6. Download the latest Factory Image: Pixel 5 - redfin to your Computer.
      7. 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

      1. Download the latest SafetyNetFix: from MAGISK MODULE ❯ Universal SafetyNet Fix 1.1.0
      2. Install SafetyNetFix
        • Open Magisk
        • Tap Modules icon
        • Tap Install from storage
        • Navigate to the SafetyNetFix file you downloaded
        • Tap the SafetyNetFix file
        • Tap the check mark (✓ at the bottom) to start the installation.
        • After it installs tap the Save icon to save the log
        • Tap Reboot.
      3. Enable Magisk Hide
        • Open Magisk Canary App
        • Tap the Setup icon.
        • Scroll down to Magisk - MagiskHide and enable it.
        • Tap Back arrow => tap Superuser icon => tap MagiskHide and enable (✓): Google Play Services and Google Play Store.
        • Close Magisk Manager.
      4. Install Magisk Modules Riru, Riru - LSPosed and install XPrivacy Lua
        • Open Magisk
        • Tap Modules icon
        • Install Magisk module Riru-...zip
        • After it installs tap the Save icon to save the log
        • Reboot
        • Open Magisk
        • Tap Modules icon
        • Install Magisk module Riru_-_LSPosed-....zip
        • After it installs tap the Save icon to save the log
        • Reboot
        • Downloaded and install XPrivacy Lua module from: here
        • Reboot
        • Open LSPosed
        • Tap Modules
        • Enable XPrivacyLua module
        • Tap 3dots Menu (top-right)
        • Tap Hide
        • Uncheck System apps
        • Tap Google Play Services
        • Tap Setup icon (top-right)
        • Scroll down
        • Tap Google Play Services
        • Scroll down and enable/check (✓)
          • Determine Activity
          • Read identifiers
          • Use analytics
          • Use tracking
        • Reboot
        • Open Magisk
        • Test SafetyNet
      5. Clear Google Play Services Data
        • Open Settings
        • Tap Apps & notifications
        • Tap see all...
        • Tap three dot menu
        • Tap Show system
        • Scroll down to Google Play Services
        • Tap it
        • Tap Storage & cache
        • Tap Clear storage
        • Exit Settings
        • reboot
      6. Check Device Certification
        • Open Google Play Store app
        • Tap Menu - Circle top right
        • Tap Settings
        • Tap About
        • check Device certification.
  8. Set Magisk App Update Channel/Update Magisk

    • Set Magisk App Update Channel

      • 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.
Do we need to remove installed magisk modules before switching to alpha? Can we still use @kdrag0n's snfix or do we have to use the provided method from the alpha apk?
 

Homeboy76

Senior Member
Aug 24, 2012
2,706
1,360
Do we need to remove installed magisk modules before switching to alpha? Can we still use @kdrag0n's snfix or do we have to use the provided method from the alpha apk?
The Magisk Alpha expert (XDA member @pndwal) is on the Magisk General Support / Discussion thread (OP, New,1. Magisk Alpha (vvb2060), Notes, 1 is the link to it.)

You can either post your question on that thread or search the thread (OP, New,1. Magisk Alpha (vvb2060), Notes, 2) for your answers.

If you post your question on the thread, don't forget to list your phone i.e., Pixel 5. :)
 
  • Like
Reactions: elong7681

elong7681

Senior Member
May 23, 2015
255
74
40
US
Moto X4
Google Pixel 2 XL
The Magisk Alpha expert (XDA member @pndwal) is on the Magisk General Support / Discussion thread (OP, New,1. Magisk Alpha (vvb2060), Notes, 1 is the link to it.)

You can either post your question on that thread or search the thread (OP, New,1. Magisk Alpha (vvb2060), Notes, 2) for your answers.

If you post your question on the thread, don't forget to list your phone i.e., Pixel 5. :)
Ok thanks for the reply
 

Homeboy76

Senior Member
Aug 24, 2012
2,706
1,360
I patched my boot.img in magisk alpha and flashed the patched.img with windows pc in cmd. All good. Booted. Magisk alpha installation ok. Performed all the steps. Still failed. What to do
The Magisk Alpha to pass SafetyNet instructions changes so quickly it is impossible for me to post all the changes in this thread. I have updated the OP, New.
 
Last edited:

pappy97

Senior Member
Dec 5, 2012
232
48
I know we have another thread for rooting the Android 12 beta/dev preview, but today (Oct 4) we are expecting Android 12 to officially drop. Do we have any idea if the method described in THIS OP will work to root the Pixel 5 with official Android 12? Thanks
 

Homeboy76

Senior Member
Aug 24, 2012
2,706
1,360
I know we have another thread for rooting the Android 12 beta/dev preview, but today (Oct 4) we are expecting Android 12 to officially drop. Do we have any idea if the method described in THIS OP will work to root the Pixel 5 with official Android 12?
Android 12 was not released today. Until it is released there is no way to determine how to root it.
 
Last edited:
Android 12 (S) was not released today. Until it is released there is no way to determine how to root it.
Rooting Android 12 works similar to Android 11 but with some changes
- Reflash VBmeta with disable flags
fastboot --disable-verity --disable-verification flash --slot=all vbmeta vbmeta.img
- Extract stock boot..img from factory zip
- Patch boot.img using Magisk
- Flash patched boot.img to /boot in fastboot

Notes: If you do not disable dm-verity and boot verification when installing the 12 Beta, your phone will not boot if a modified boot.img is flashed, and will return a verification error. Unknown if this will be necessary on 12 Final.

The only method that does not currently work is flashing Magisk directly using TWRP, as TWRP does not yet support Android 12.

To pass SafetyNet, install the Universal SafetyNet Fix in Magisk, and use Magisk Hide against Google Play Services (com.google.android.gms).

Be aware that other apps may check for the presence of root, so you'll need to use Magisk Hide against those as well. Examples include GPay, Netflix, Amazon Prime Video, banking apps, etc - anything that might be security sensitive or use DRM.
 
Last edited:
  • Like
Reactions: Homeboy76

Homeboy76

Senior Member
Aug 24, 2012
2,706
1,360
Rooting Android 12 works exactly the same as Android 11:
- Extract stock boot..img from factory zip
- Patch boot.img using Magisk
- Flash patched boot.img to /boot in fastboot

The only method that does not currently work is flashing Magisk directly using TWRP, as TWRP does not yet support Android 12.

To pass SafetyNet, install the Universal SafetyNet Fix in Magisk, and use Magisk Hide against Google Play Services (com.google.android.gms).

Be aware that other apps may check for the presence of root, so you'll need to use Magisk Hide against those as well. Examples include GPay, Netflix, Amazon Prime Video, banking apps, etc - anything that might be security sensitive or use DRM.
So, the answer to @pappy97 question is yes.
 
Not sure if this has already been posted in this thread...

Rooting Android 11 using TWRP

Prerequisites: Unlocked bootloader, SDK Platform Tools, Developer Options and USB Debugging enabled

Directions:
1. Download TWRP to your PC
2. Download Magisk 23.0 to your phone, then install the APK; if you open the app you'll see Magisk at the top, N/A under "Installed" means the kernel is not rooted
3. Connect phone to PC with USB cable; ensure ADB sees device:
Code:
adb devices
You should see a device ID, if not, reconnect the USB cable and authorize your PC for USB debugging
4. Reboot phone to bootloader:
Code:
 adb reboot bootloader
5. Boot TWRP:
Code:
 fastboot boot twrp.img
HINT: the easiest way to do this is type fastboot boot into the command line, then simply drag and drop the TWRP .img file into the command window

NOTE: DO NOT use "fastboot flash boot" as this will overwrite /boot with the TWRP image, meaning your phone will only boot into TWRP; if you do this, you'll need to flash the factory boot.img to be able to boot into system
6. In TWRP, install Magisk (should be in your /sdcard/downloads directory)
7. Reboot to system
8. Open Magisk, you should see 23001 under "Installed"

Enjoy root!
 

Homeboy76

Senior Member
Aug 24, 2012
2,706
1,360
Not sure if this has already been posted in this thread...

Rooting Android 11 using TWRP

Prerequisites: Unlocked bootloader, SDK Platform Tools, Developer Options and USB Debugging enabled

Directions:
1. Download TWRP to your PC
2. Download Magisk 23.0 to your phone, then install the APK; if you open the app you'll see Magisk at the top, N/A under "Installed" means the kernel is not rooted
3. Connect phone to PC with USB cable; ensure ADB sees device:
Code:
adb devices
You should see a device ID, if not, reconnect the USB cable and authorize your PC for USB debugging
4. Reboot phone to bootloader:
Code:
 adb reboot bootloader
5. Boot TWRP:
Code:
 fastboot boot twrp.img
HINT: the easiest way to do this is type fastboot boot into the command line, then simply drag and drop the TWRP .img file into the command window

NOTE: DO NOT use "fastboot flash boot" as this will overwrite /boot with the TWRP image, meaning your phone will only boot into TWRP; if you do this, you'll need to flash the factory boot.img to be able to boot into system
6. In TWRP, install Magisk (should be in your /sdcard/downloads directory)
7. Reboot to system
8. Open Magisk, you should see 23001 under "Installed"

Enjoy root!
It is always good to have an alternative method of rooting, Android 11. Thanks.
 
Last edited:
It is always good to have an alternative method of rooting, Android 11 (Q). Thanks.
Android 10 was originally Android Q, but Google is no longer using dessert codenames, so the official brand is just Android 10. There is no letter designation for Android 11 or 12.

I personally found the TWRP method to be less troublesome than manually patching the boot image; installing Magisk in TWRP patches the boot image without needing to flash /boot or swap files between the phone and the PC. This also makes it easier after OTAs, because after you update (and lose root in the process) the only thing you need to do is boot into TWRP again and install Magisk.

There's also no need to disable any Magisk modules prior to updating, and safetynet still passes after you're done.

Again, this isn't viable on the 12 Beta, nor will it work on 12 Final until TWRP is updated to play nice with A12.
 

Homeboy76

Senior Member
Aug 24, 2012
2,706
1,360
Android 10 was originally Android Q, but Google is no longer using dessert codenames, so the official brand is just Android 10. There is no letter designation for Android 11 or 12.

I personally found the TWRP method to be less troublesome than manually patching the boot image; installing Magisk in TWRP patches the boot image without needing to flash /boot or swap files between the phone and the PC. This also makes it easier after OTAs, because after you update (and lose root in the process) the only thing you need to do is boot into TWRP again and install Magisk.

There's also no need to disable any Magisk modules prior to updating, and safetynet still passes after you're done.

Again, this isn't viable on the 12 Beta, nor will it work on 12 Final until TWRP is updated to play nice with A12.
You're right!.
 
Last edited:

pappy97

Senior Member
Dec 5, 2012
232
48
Android 12 was released via OTA to P5 today. I removed magisk and took the OTA. So I had stock Android 12 on my P5, unrooted. Then I did the usual patch the boot image, put that on my pc, and fastboot flash boot that image.

Didn't work. When I did that, the phone would only boot to the bootloader, it wouldn't boot the system. I ended up having to flash the android 12 factory image to get my phone working again, but I have no root. I'm not clear on how you root a Pixel 5 that has today's Android 12 drop.

Any ideas? Thanks!
 

elong7681

Senior Member
May 23, 2015
255
74
40
US
Moto X4
Google Pixel 2 XL
Android 12 was released via OTA to P5 today. I removed magisk and took the OTA. So I had stock Android 12 on my P5, unrooted. Then I did the usual patch the boot image, put that on my pc, and fastboot flash boot that image.

Didn't work. When I did that, the phone would only boot to the bootloader, it wouldn't boot the system. I ended up having to flash the android 12 factory image to get my phone working again, but I have no root. I'm not clear on how you root a Pixel 5 that has today's Android 12 drop.

Any ideas? Thanks!
 
Last edited by a moderator:
I honestly don't know how to link the thread and I don't know how to put the commands for ADB in that little box that says code
Link: click this icon
1634745773736.png
when you're typing a message, paste the link into the URL space, and name the link whatever you want using the Text space.

To use code blocks, there are a couple ways to do it:
The simplest is to click the More icon
1634745898710.png
next to Font Size, then click Inline Code (second icon from the right, looks like
1634746045751.png
and type the code between what pops up.

The slightly harder way is to use the code blocks yourself:

[code] type code here [/code]
And in case you're curious here's the difference

This is Inline Code

Code:
This is standard code
 
Last edited:
  • Like
Reactions: elong7681

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Thank you for your help I really appreciate it!
    Absolutely, helping each other is what makes this community work.
    1
    Android 12 (S) was not released today. Until it is released there is no way to determine how to root it.
    Rooting Android 12 works similar to Android 11 but with some changes
    - Reflash VBmeta with disable flags
    fastboot --disable-verity --disable-verification flash --slot=all vbmeta vbmeta.img
    - Extract stock boot..img from factory zip
    - Patch boot.img using Magisk
    - Flash patched boot.img to /boot in fastboot

    Notes: If you do not disable dm-verity and boot verification when installing the 12 Beta, your phone will not boot if a modified boot.img is flashed, and will return a verification error. Unknown if this will be necessary on 12 Final.

    The only method that does not currently work is flashing Magisk directly using TWRP, as TWRP does not yet support Android 12.

    To pass SafetyNet, install the Universal SafetyNet Fix in Magisk, and use Magisk Hide against Google Play Services (com.google.android.gms).

    Be aware that other apps may check for the presence of root, so you'll need to use Magisk Hide against those as well. Examples include GPay, Netflix, Amazon Prime Video, banking apps, etc - anything that might be security sensitive or use DRM.
    1
    Thank you, however next time it would probably suffice just to link the thread
    1
    I honestly don't know how to link the thread and I don't know how to put the commands for ADB in that little box that says code
    Link: click this icon
    1634745773736.png
    when you're typing a message, paste the link into the URL space, and name the link whatever you want using the Text space.

    To use code blocks, there are a couple ways to do it:
    The simplest is to click the More icon
    1634745898710.png
    next to Font Size, then click Inline Code (second icon from the right, looks like
    1634746045751.png
    and type the code between what pops up.

    The slightly harder way is to use the code blocks yourself:

    [code] type code here [/code]
    And in case you're curious here's the difference

    This is Inline Code

    Code:
    This is standard code
    1
    Link: click this icon View attachment 5437537 when you're typing a message, paste the link into the URL space, and name the link whatever you want using the Text space.

    To use code blocks, there are a couple ways to do it:
    The simplest is to click the More icon View attachment 5437539 next to Font Size, then click Inline Code (second icon from the right, looks like View attachment 5437543 and type the code between what pops up.

    The slightly harder way is to use the code blocks yourself:

    [code] type code here [/code]
    And in case you're curious here's the difference
    This is Inline Code
    Code:
    This is standard code
    Thank you for your help I really appreciate it!
  • 26
    [Guide] Root Pixel 5 Android 12 Unlock/Lock Bootloader + Systemless ROOT
    Android Security Bulletin—October 2021
    Pixel Update Bulletin—October 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
    1. Upgrade to Android 12 from 12 Beta (No Wipe)
    2. Upgrade to Android 12 added to (OP, Index, #4, Note #3)
    3. Root Android 12 added to (OP, Index, #7)
    4. Magisk Alpha (vvb2060)


    Update(s)
    1. Factory/OTA Images - 10/19
    2. Magisk Stable - Magisk-23.0 05/12
    3. Magisk Beta - Magisk-23.0 05/12
    4. Magisk Canary - Magisk-23010 10/24
    5. TWRP - Waiting for T.R.W.P. for Android 12
    6. SafetyNet - SafetyNetFix v2.1.1
    7. SDK Platform-tools - r31.0.3 08/18
    8. Custom Kernels
      • ElementalX - Check ElementalX Kernel Manager
      • CleanSlate vR1.8.5 06/13 S (B5) 2.8.9 23/10
    9. Custom ROMs
      • Waiting for Android 12 ROMS

    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 12 Factory or OTA Image: "redfin" for Pixel 5

      Factory Image

      OTA Image
    3. A Computer with the latest SDK Platform-Tools: r31.0.3 installed.
      • Important: Update Platform Tools, regularly, for optimal performance.

    Other Guides

    Credits/Thanks/Recognitions
    1. @V0latyle - Instructions to Root Pixel 5 on Android 12.
    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 a Command Prompt on Computer
        1. Open File Explorer, click the platform-tools folder ==> click the folder icon (left side of address bar) to highlight it type cmd and press enter.
        2. Open a Powershell Command Prompt on Computer: Open File Explorer, click the platform-tools folder ==> click the folder icon (left side of address bar) to highlight it type powershell and press enter.
        3. Notes:
          • Enable USB Debugging, on your phone: Settings ==> System ==> Advanced ==> Developer options ==> Scroll down to USB debugging and enable it.
          • When using the Powershell Command Prompt Commands must be preceeded with ./: i.e, ./fastboot devices
          • If you do not want to open a Command Prompt every time you want to use the fastboot command, add the path to the Platform-tools folder to Windows environment variables.
      • Boot fastboot mode (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 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.
          Notes: After unlocking your bootloader, you'll see a warning: The bootloader is unlocked and... 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 11 to Android 12: I recommend doing a clean install. What is a clean install?
        2. Using flash-all.bat file without removing the -w.
        3. If you are upgrading to Android 12 and you want to root it. You must wipe your phone, disable verity, and disable verification. The quickest way to do this is edit the flash-all. bat file. Change this line: fastboot -w update image-bramble-aa9a.999999.999.zip to this: fastboot --disable-verity --disable-verification -w update image-bramble-sp1a.999999.999.zip
        4. Always verify you have the latest version of SDK Platform-Tools installed on your computer before installing the Factory Image: Pixel 5 - redfin.
        5. If your phone was rooted, and you want to 'Keep Data'. Do this first open Magisk ==> unhide Magisk App (if you hid it) ==> Disable/Remove all modules ==> then Uninstall Magisk - Restore images prior flashing the Factory image. Why? The changes in the New factory image may cause Magisk modules to fail. This will cause boot loops. Additionally, before Enabling/Installing the modules you Disabled/Removed check with the Dev of the module to ensure it was updated to work with the latest factory image.
        6. 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.
          • Change Computers.
        7. Backup your data
        8. Download the latest Factory Image: Pixel 5 - redfin to your Computer.
        9. 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 11 (R) to Android 12 (S): I recommend doing a clean install. What is a clean install?
          • Doing a Factory reset prior to installing, major, update.
          • Use 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 Remove Modules/Uninstall Magisk. Why? The changes in the NEW 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
      • Root Android 12

        1. You dirty flashed Android 12 factory image: Removed the -w from flash-all.bat file
        2. You are still on Android 11, you want to upgrade to Android 12 and root it.
      • 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

        1. Pass Safety Net with Magisk Alpha or Canary 23010
        2. Pass Safety Net with Magisk Beta, Stable or Canary

          • Download the latest SafetyNetFix: MAGISK MODULE ❯ Universal SafetyNet Fix 1.1.0
          • Install SafetyNetFix
            1. Open Magisk
            2. Tap Modules icon
            3. Tap Install from storage
            4. Navigate to the SafetyNetFix file you downloaded
            5. Tap the SafetyNetFix file
            6. Tap the check mark (✓ at the bottom) to start the installation.
            7. After it installs tap the Save icon to save the log
            8. Tap Reboot.
          • Enable Magisk Hide
            1. Open Magisk Canary App
            2. Tap the Setup icon.
            3. Scroll down to Magisk - MagiskHide and enable it.
            4. Tap Back arrow => tap Superuser icon => tap MagiskHide and enable (✓): Google Play Services and Google Play Store.
            5. Close Magisk Manager.
          • Install Magisk Modules Riru, Riru - LSPosed and install XPrivacy Lua
            1. Open Magisk
            2. Tap Modules icon
            3. Install Magisk module Riru-...zip
            4. After it installs tap the Save icon to save the log
            5. Reboot
            6. Open Magisk
            7. Tap Modules icon
            8. Install Magisk module Riru_-_LSPosed-....zip
            9. After it installs tap the Save icon to save the log
            10. Reboot
            11. Downloaded and install XPrivacy Lua module from: here
            12. Reboot
            13. Open LSPosed
            14. Tap Modules
            15. Enable XPrivacyLua module
            16. Tap 3dots Menu (top-right)
            17. Tap Hide
            18. Uncheck System apps
            19. Tap Google Play Services
            20. Tap Setup icon (top-right)
            21. Scroll down
            22. Tap Google Play Services
            23. Scroll down and enable/check (✓)
              • Determine Activity
              • Read identifiers
              • Use analytics
              • Use tracking
            24. Reboot
            25. Open Magisk
            26. Test SafetyNet
          • Clear Google Play Services Data
            1. Open Settings
            2. Tap Apps & notifications
            3. Tap see all...
            4. Tap three dot menu
            5. Tap Show system
            6. Scroll down to Google Play Services
            7. Tap it
            8. Tap Storage & cache
            9. Tap Clear storage
            10. Exit Settings
            11. reboot
          • Check Device Certification
            1. Open Google Play Store app
            2. Tap Menu - Circle top right
            3. Tap Settings
            4. Tap About
            5. check Device certification.
    8. Set Magisk App Update Channel/Update Magisk

      • Set Magisk App Update Channel

        • 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

      • Need help with a Custom ROM?
        • First, read and follow the Installation Instructions. The installation instructions are in the OP.
        • Second, if you have a problem Installing it, Search the thread of the Custom ROM you are trying to install for a solution to problem: If you don't find a solution post your request for help on the thread.
      • ROMs
        1. Alpha/Beta

          • None
        2. Official

          • None
        3. Unofficial

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

      • Waiting for Android 12 T.W.R.P.
    5
    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
    Thank you for your help I really appreciate it!
    Absolutely, helping each other is what makes this community work.
    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