[Google Pixel 5 Questions & Answers] Raz0Rfail:
Enable Developer mode in settings

Open Settings App

Move to About The Phone

7 Taps on the Build-Number

Enable OEM-Unlock in settings

Go back to Main Menu of Settings

move to system

Unfold Extended

Open Developer options

Enable OEM-Unlock

If you go further, you should either have a clean phone or backup your data. Because if you unlock the bootloader, the entire phone will be wiped.

Reboot Phone in Fastboot

Turn off Phone with long press on Power Button and click turn off

Press Power Button + Lower Volume together for some seconds and you are in fastboot mode

Use Fastboot to unlock Phone

If you don't have it download at first the needed adb and fastboot files for your system:

https://developer.android.com/studio/releases/platform-tools

Extract it to a path where you want it.

Connect your P5 with your PC with an USB cable

Open the path where you have extracted the adb tools.

On Windows press Shift + Right click and in the context menu click on open commandline Window

If you enter the following console command you should see an listed device about it's serial number:

fastboot devices

If you get an empty result, you have to check if P5 is correct connected via usb and p5 is in fastboot mode (you see it onscreen)

It could be that you have to install the usb drivers at first for recognizing it via fastboot.

If a Serial was listed in the Previous step, go further.

Enter the following command to start to unlocking your phone

fastboot flashing unlock

On your Phone you see a message to "not unlock your phone", with volume up you switch it to "unlock your phone". With the Power Button you accept it.

It will reboot now and at this moment it wipes the entire phone, so you start again from scratch to configure the p5.

if you have a Pixel 5 without the KDDI Version, you can use the following boot image, which is already a prepatched boot image including magisk 21 (Build 21005).

Download it at first:

http://www.mediafire.com/file/8ll4mlzt3l9njph/magisk_patched+Build+21005.img/file

Copy the img-file to the path where you had extracted the adb files.

After you have configured your phone so you can use it, turn off p5 again and go again into fastboot mode.

Ensure your phone is connected via usb to the PC.

In the opened command line Window enter the following command:

fastboot flash boot "magisk_patched Build 21005.img"

After it finished you can reboot your phone into android system and you will see the magisk manager logo.

Open it and you should see magisk 21005 is installed, then you know root access is granted.

For Safetynet you have to do the following steps

In Magisk Manager open settings gear.

under Magisk enable MagiskHide

Above MagiskHide is a menupoint called "Hide Magisk Manager", click on it, give the magisk manager a new name, click ok and wait until it's reopend.

Go to main menu of the magisk manager. On bottom is a "shield icon" open it.

Go to "MagiskHide"

On Top is the item "Google Play Services" unfold it and set every hook on it.

It's recommended to set the hook on every google Service you find.

Go Back to main menu of magisk manager

On Buttom you click the puzzle icon.

On Buttom you see the search Icon, search for "MagiskH" and install the Module "MagiskHide Props Config"

After finished installation reboot your P5.

Either you install the "Terminal" via the Google Play Store or you activate USB debugging in the developer options and use the command "adb shell".

the following Commands are for both ways

su
props

su for getting root access (you have to grant it) and props is the software for magiskhide Props.

The following commands to set your P5 as an P3a with basic Authorization

2 + Enter
f + Enter
7 + Enter
20 + Enter
y + Enter
y + Enter

After reboot check safetynet state in Magisk Manger, it should be OK.

Now you have a rooted phone and a valid safetynet.