[Google Pixel 7 Pro] anirudhgupta109:
How to root:

You have two options for this, 1 is the recommended way and 2 is the lazy but works way.

Option 1 (RECOMMENDED):

Download the latest factory image from: https://developers.google.com/android/images#cheetah (at the time of writing this, it's TD1A.220804.031

Unlock bootloader (If you don't know how to do this, do not proceed further)

From the downloaded image file, extract the init_boot.img file and copy it to your phone (directory shouldn't matter)

Install the Magisk apk from: https://raw.githubusercontent.com/topjohnwu/magisk-files/canary/app-release.apk

Launch the app, select install, patch a file, select the init_boot file you placed in your phone

After it's done, it should place a file in your phone's download folder called magisk_patched-<VERSION>_<XYXYXYXYXY>.img

Copy that over to your PC and now boot to bootloader

Run the following commands from Powershell/commandline:

fastboot flash init_boot magisk_init_patched-25205_EfWOu.img

And then reboot, you'll be rooted

Option 2 (LAZY BUT WORKS):

I'm sharing my magisk patched init_boot from the TD1A.220804.031 build (post 73MB update). Instructions are:

Unlock bootloader (If you don't know how to do this, do not proceed further)

Boot to bootloader

Download the patched init_boot from: https://sourceforge.net/projects/ag.../magisk_init_patched-25205_EfWOu.img/download

Run the following commands from Powershell/commandline:

fastboot flash init_boot magisk_init_patched-25205_EfWOu.img

And then reboot, you'll be rooted

Install Magisk apk from here: https://raw.githubusercontent.com/topjohnwu/magisk-files/canary/app-release.apk

To get SafteyNet working:

Open the Magisk app

Open the settings from top right, Enable Zygisk

Reboot

Flash the MODIFIED SafteyNet fix module by @kdrag0n from the attached files on this thread from within Magisk Modules

Clear Play store data and you should be good!

Voila!

FASTBOOT IMAGES:

I'm sharing the stock extracted images of the TD1A.220804.031 build, should be a good reset point from fastboot incase any of you get stuck somehwere:

DO NOT MIRROR THIS PLEASE!!!!

VERIFY THE MD5 OF THE FILE AFTER DOWNLOADING!!!!!!!

Mirror 1 | Mirror 2

MD5: 43613f520697722840ded6a15eb27459

Massive shoutout to @Some_Random_Username for Mirror 1 and @akhilnarang for Mirror 2 since SourceForge was facing issues!

Now documentation on how to do it yourself (which I'd highly recommend since you should never trust any file given, always try to do it yourself!):

How to dump your own device:

1. Download a GSI which is userdebug/eng and equal/newer Security Patch of the current build on your device from any of the unofficial community builds here: https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list

2. Install the DSU Sideloader app from: https://github.com/VegaBobo/DSU-Sideloader/releases/latest

3. Follow instructions in the DSU sideloader app readme here: https://github.com/VegaBobo/DSU-Sideloader/blob/master/README.md

I'd recommend enabling the userdata toggle and typing 32GB as the size

4. Reboot into the DSU from the notification

5. When the device boots up, type the following in the terminal:

adb root
adb shell
mkdir -p /sdcard/dump
for file in /dev/block/bootdevice/by-name/*; do
if [ "${file##*/}" != "userdata" ]
then
echo Dumping "${file##*/}"
dd if=$file of=/sdcard/dump/"${file##*/}".img
fi
done

6. Once the dump is done, you'll have files in /sdcard/dump/

7. Copy those over to a PC

8. Voila