[Google Pixel 5 Questions & Answers] slippermann:
--- PREREQUISITES:

Please download everything listed below they are not optional.

Android SDK Platform-Tools - https://developer.android.com/tools/releases/platform-tools

Google Pixel Stock Firmware (SELECT LINK, NOT FLASH) - https://developers.google.com/android/images#redfin

PixelFlasher - https://github.com/badabing2005/PixelFlasher/releases

QPST Tool - https://qpsttool.com/qpst-tool-v2-7-496

Pixel 5 Bits and Pieces - https://drive.google.com/file/d/1Ukxx27e25HZ93XGjdZbepcsjenY7eFd7/view?usp=sharing

--- INSTRUCTIONS:

-- FLASHING STOCK FIRMWARE, ROOT AND INSTALLING MODULES

1) Flash stock firmware onto the phone using PixelFlasher:

- scan for ADB-connected device.

- download the stock firmware image for the phone.

- browse to the image zip on PixelFlasher and process.

- select the image from the list and patch.

- select WIPE all Data and Flash Boot.

- accept prompts to install Magisk and install the stable build.

2) Go through the first-time setup on the device.

3) Open the Magisk app, and let it finish setting up.

4) Once Magisk has rebooted the phone, go to settings and enable Zygisk.

5) Download the following modules attached.

6) Use adb to push each module file to the device: "adb push '*file path to module zip*' /sdcard/"

7) Go to the modules section on the Magisk app, and select "Install from storage".

8) Navigate to the root of the phone (3 bars top left corner of the screen, select pixel 5 and scroll down).

9) Install "Volte_switchonly.zip", "Pixel5_NR_magisk.module3.88.zip" and "safetynet-fix-v2.4.0.zip". Reboot the phone.

-- EXTRACTING MBN

10) Extract "EfsTools-0.10-modded-1.2-win32.zip"

11) Open "Pixel 5 MBNs.zip" and locate the corresponding mbn for your carrier.

12) Extract your mbn to the root of the extracted "EfsTools-0.10-modded-1.2-win32" folder.

13) Open a CMD/Powershell window in the extracted "EfsTools-0.10-modded-1.2-win32" folder.

14) Enter the following command:

- EfsTools.exe extractMbn -i mcfg_sw.mbn -p mcfg

15) Rename each file so the suffix on the end is removed (it was __E1FF_F in my case).

-- COPYING MBN FILES TO PHONE

16) With the phone connected to the computer, launch command prompt and type the following commands:

- adb devices (verify the phone is recognised)

- adb shell

- su

- resetprop ro.bootmode usbradio

- resetprop ro.build.type userdebug

- setprop sys.usb.config diag,diag_mdm,adb

- diag_mdlog

When it hangs at "failed to open diag socket", cancel the current operation by pressing ctrl + c.

17) Change the USB config on the phone to file transfer, and back to no data transfer.

18) Once finished, launch QPST Configuration, go to Start Clients and select EFS Explorer.

19) Select the phone and click OK.

20) Once loaded, navigate to the "mcfg" folder.

21) Now comes the most tedious bit - put every file and folder from the mcfg folder on your computer onto the mcfg folder on EFS Explorer.

22) Once finished, close out of EFS Explorer and QPST.

-- QCN IMEI RESTORE

23) Download the .qcn file and open IMEIRebuilder.exe.

24) Once open, open up the .qcn file and type in your IMEI number for the first and second SIM slots. (Pixel only comes with one SIM, so I just put the same IMEI for both IMEI 1 and 2 on the program).

25) Click rebuild and save the file.

-- QCN BACKUP RESTORE

26) Open QFIL, and select a port (if no ports appear, follow instruction 11.

27) Go to the Configuration tab and select "FireHose Configuration".

28) Change the "Device Type" to your device's storage type (can be found by entering the phone brand and model into GSMArena. But should be UFS for Pixel 5's).

29) Ensure "Reset After Download" and "Erase All Before Download" are unchecked. Click OK.

30) Go to the Tools tab and select "QCN Backup Restore". Browse for your modified .qcn file and select Restore QCN.

31) Reboot your phone and hope everything worked. If not it might be worth giving your phone a few days to sort itself out.