[Google Pixel 5 Guides, News, & Discussion] ObliviousEnigma:
Hello.

This guide is designed to remove the verbosity and complexity of both rooting your Google Pixel 5 device and installing the ProtonAOSP 11 ROM and Proton kernel.

This guide is oriented towards users of the Linux platform as opposed to the Windows platform.

--------------------

Quick reference for links (ROMs, Magisk, ProtonAOSP 11)​

Official Google Firmware images (ROMs): https://developers.google.com/android/images

Official XDA Magisk link: https://www.xda-developers.com/how-to-install-magisk/

Official Magisk GitHub link: https://github.com/topjohnwu/Magisk/releases/tag/v23.0

Official Magisk APK (Android automated installer): https://github.com/topjohnwu/Magisk/releases/download/v23.0/Magisk-v23.0.apk

Official ProtonAOSP 11 thread: https://xdaforums.com/t/rom-pixel-5-official-protonaosp-11.4188129/

Official Proton kernel thread: https://xdaforums.com/t/kernel-pixel-5-proton-kernel.4194683/

Official ProtonAOSP 11 manual installation guide: https://protonaosp.kdrag0n.dev/install/manual

Official ProtonAOSP 11 ROM images: https://protonaosp.kdrag0n.dev/download (supported: Pixel 4, Pixel 4 XL, Pixel 4a 5G, Pixel 5)

Official ProtonAOSP 11 kernel image: https://github.com/kdrag0n/proton_kernel_redbull/releases/download/v2.1/ProtonKernel-pixel5-v2.1.img

Official ProtonAOSP 11 kernel image GitHub link: https://github.com/kdrag0n/proton_kernel_redbull/releases

--------------------

Enabling developer options and selecting File Transfer as the default option for USB connections​

Fully charge your phone to 100% (prevents potential accidents)

Enable developer options (Settings -> About Pixel -> Tap on Build number repeatedly)

Close and re-open Settings

Enable Developer options (Settings -> System -> Developer Options -> toggle option at the top)

Enable OEM unlocking (toggle the option; follow the prompts if any appear)

Enable USB debugging (toggle the option)

Enable File Transfer (found under the Default USB configuration menu from Developer options)

Install the necessary presrequite programs for your computer (Linux)​

Visit https://developer.android.com/studio/releases/platform-tools (universal method for all distros)​

Arch Linux packages: android-tools, android-udev (adb, fastboot and udev rules for quick USB connections)​

Debian, Ubuntu packages: android-sdk-platform-tools-common​

Installing Magisk and rooting your phone (presrequite for a custom ROM)​

Download your phone's official ROM to your computer (found here)​

Extract the *.zip file and locate the boot.img file​

Connect your phone to your computer (via a data-transfer capable USB cable)​

Copy the boot.img to your phone​

Download the Magisk APK to your phone and install the program (found here)​

Run the Magisk program on your phone​

Select Install (upper right corner) -> Select and Patch a File -> Navigate to your boot.img file​

Copy the modified boot.img (found under the Download directory) back to your computer​

Reboot your phone into 'fastboot mode' (using a terminal from your computer): adb reboot bootloader​

Flash (permenant modification) your phone's boot partition (using a terminal from your computer): fastboot flash boot /path/to/magisk_patched.img​

Magisk is now installed on your phone (your phone is rooted)​

The phone should have restarted itself; fill in minimal information and do not configure anything (installing the custom ROM/kernel will wipe the data from the phone, again).

Installing ProtonAOSP 11 ROM and Proton Kernel while

maintaining root status

​

Download the ProtonAOSP 11 ROM firmware for your device (found here)​

Extract the *.zip file and navigate to the inner folder (EG: redfin-rq2a.210505.003)​

Reboot your phone into 'fastboot mode' (using a terminal from your computer): adb reboot bootloader​

Wipe all data (permenant destruction) from your device: fastboot -w​

Run the flash-all script (using a terminal from your computer): ./flash-all.sh (do not touch your phone while this is running)​

Flash (permenant modification) your phone's boot partition (using a terminal from your computer): fastboot flash boot magisk_patched.img (NOTE: You might need to use Magisk to patch the ProtonAOSP 11's boot.img file)​

Flash (permenant modification) your phone's boot partition to overwrite the kernel (using a terminal from your computer): fastboot boot ProtonKernel-pixel5-v2.1.img​

That's it! Your phone should automatically restart and boot up. Fill out all necessary information and configure your newly rooted phone that has a custom ROM and kernel installed.

NOTE: You may also find this bash script to be a little easier to work with, although it requires some minor manual labor initially; it is especially useful if you plan on installing and rooting multiple phones or if you plan on testing out other ROMs

#!/bin/sh

echo REBOOTING INTO BOOTLOADER...
adb reboot bootloader
sleep 5

echo ERASING USERDATA...
fastboot -w
sleep 5

echo FLASHING ALL PARTITIONS...
./flash-all.sh
sleep 5

echo FLASHING Magisk patched ProtonAOSP ROM boot image
fastboot flash boot magisk_boot.img
sleep 5

echo FLASHING ProtonAOSP kernel image
fastboot boot ProtonKernel-pixel5-v2.1.img
sleep 5

Hopefully this helps simplify the process of how to install the ProtonAOSP 11 ROM and kernel and using Magisk to root your phone!

Everything should work for a phone with Android 12 updated; please read those official threads before following this guide.