[Google Pixel 4 XL Guides, News, & Discussion] KJ7LNW:
This is my first venture in the absence of "comfortable" apps that come from Google, so please reply with any suggestions for things like messaging, calendar, etc.

I did a similar guide for the Pixel 3a but the 3a came with a broken speaker so we ordered a 4XL and I'm adding this guide specific to that phone, and switching from Google Apps to microG. Also in the previous guide it was using Google Apps, whereas this guide shows how to do it with microG, F-Droid, and Aurora Store to replace the Google Play store and its related bloatware.

This guide will should work on the Google Pixel 4, and possibly other Pixel devices as well assuming you adjust your release version appropriate to your model (eg, "coral" is for the 4XL).

Enable developer mode

OEM Unlock: method 1, method 2

Unlock the bootloader:

adb reboot bootloader

fastboot flashing unlock

Install the latest android platform tools for fastboot and adb:

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

Install the official Android 11 for updated firmware:

https://developers.google.com/android/images?authuser=3#coral

Agree to terms and conditions

Download the latest v11 zip (RQ3A.211001.001, Oct 2021)

Unzip and run:

Windows: flash-all.bat

Linux: ./flash-all.sh

Repeat #3 above if necessary

Download and transfer LineageOS 18.1 with microG patches:

https://download.lineage.microg.org/coral/

Download the latest recovery .img to your desk

Download the latest .zip to your desk

Install the recovery image:

fastboot flash --slot all boot lineage-18.1-20211103-microG-coral-recovery.img

Reboot to recovery (may need to power off first)

From the Phone: In recovery it should show the LineageOS icon:

Advanced->Enable ADB (may not be necessary)

Apply Update

Apply from ADB

From your desk:

adb sideload lineage-18.1-20211103-microG-coral.zip

If you get errors like error: protocol fault (no status) then your version of adb is too old.

It should say Total xfer: 1.00x but the official LineageOS installation docs say that it might hang at 47% and that is ok because it is done transferring to the phone at that point.

Using microG. just reboot ;) From your phone:

If you want the Google Apps add-on on your device, you must follow this step before booting into LineageOS for the first time!

If so, then tap Apply Update->Apply from ADB and follow Google Apps .zip install notes below in #7.3

If not, then tap the left return arrow and then tap "reboot now"

F-Droid

Open the "Browser" app

Go to www.f-droid.org

Download the .apk

Open the Files app, browse to Downloads and open the F-Droid.apk file.

OPTIONAL: If you want apps from the google store, then install Aurora Store:

Open F-Droid, search for "Aurora Store" and install it

Now install whatever other F-Droid and Aurora apps you want.

Alternative Apps

I always install AFWall+ and allow only the apps that I care to have access. If there are alternative apps to AFWall+ that work well for a firewall then please reply below!

Maps & Navigation: Haven't tried these yet, but trying to jump ship from Google Maps. What mapping software do you like?

OmsAnd

Organic Maps

Navit

Please suggest others and I'll update them here

Optional ZIPs:

If you are already in recovery, go to step #7.2. Otherwise, get into recovery. If you already booted into LineageOS, then I find it easiest to reboot into recovery by enabling "Advanced Restart" :

Systems->Advanced->Gestures->Power->Advanced restart

Then hold down the power button and select Power->Reboot->Recovery

To install zips:

First mount /mnt/system: Adbanced->Mount/Unmount System

This is necessary because the Pixel is a A/B boot slot device and not all .zip's will know how to mount.

Use adb sideload <filename.zip> as in #6.4 above (but with the .zip you want!)

You may be prompted on your phone to install even though the signature is untrusted.

Root your device with Magisk:

Download the latest Magisk APK:

Note that the .apk is also a .zip, so rename it if you must (but I didn't need to).

Enable adb

Install the apk:

adb install Magisk-v23.0.apk

Troubleshooting:

LineageOS recovery doesn't like to install multiple zips at once. If you get the error adb: sideload connection failed: closed then click the left back arrow, then again folow steps from 6.4

Try factory reset if you have boot issues the first time