[Essential Phone Guides, News, & Discussion] Quantizr:
EDIT: Andy Yan updated his ROM to include GApps which makes this a lot easier.

ROM link: https://sourceforge.net/projects/andyyan-gsi/files/Testing/lineage-19.0-20211109-UNOFFICIAL-treble_arm64_bgS-personal.img.xz/download

Just follow this guide: https://xdaforums.com/t/gsi-rom-aosp-android-gsi-support-for-essential-phone.4326297/

Then skip to step 10 and continue in order to be able to use play store.

Sorry in advance for the confusing nature of this guide. I had no idea what was going on half the time. This is the result of me trying to get Android 12 to work for around 12 hours (mostly time spent reflashing system images after screwing something up).

I probably won’t link every single tool and define every term as I’m just trying to outline what to do and why. There are probably some unnecessary steps in here, but I have no idea which ones are unnecessary..

For the Android 12 GSI, I used Andy Yan’s (he’s a LineageOS Contributor) Lineage 19 personal build found here: https://sourceforge.net/projects/an...IAL-treble_arm64_bvS-personal.img.xz/download

Edit: that version has been deleted now and replaced with a version that doesn't work for me at least...

If you don’t care for installing gapps, this whole thing becomes a lot easier, just follow the instructions here (https://xdaforums.com/t/gsi-rom-aosp-android-gsi-support-for-essential-phone.4326297/) except with the above ROM.

If you do want to install gapps, there are quite a few extra steps. (Or maybe I’ve been doing it wrong the whole time)

Known bugs:

I keep getting a push notification that says “android system intelligence has stopped” but everything else works fine

Disabling app in settings fixes this

Carrier voice calls and SMS do not work (Google Voice/Whatsapp work fine)

Background:

The touchscreen in TWRP stopped working after the September 2018 software update, if you have an OTG adapter, you can still use a mouse.

TWRP is useful in expanding the system partition and installing gapps

the PH1 uses an A/B slots, we can keep an old August 2018 version on the B slot to work with TWRP and the new Android 12 GSI on the A slot

Step 1: Flash the August 2018 ROM onto the B slot

This ROM allows for TWRP to work with touch.

Download: https://sourceforge.net/projects/ma...st/PQ1A.190105.112-BACK-TO-STOCk.zip/download

Extract the folder, right click the file called “flashallwipe.bat” and edit it. Delete any lines with “fastboot flash” followed by something “_a” for example “fastboot flash nvdef_a nvdef” so that the only things remaining are the ones with “_b”s.

Once you’ve done that save the file.

Reboot your phone to the bootloader (hold power button + volume down or run “adb reboot bootloader” in the command prompt).

With your phone plugged in, run the edited “flashallwipe.bat” and wait

Step 2: Flash the October 2019 ROM onto the A slot:

This step might not be necessary, depending on what your current ROM is, however, if you have an older ROM, for example, the August 2018 ROM on the A slot, your touchscreen will stop working on the GSI, so its probably better just to do this just in case.

Download:

https://sourceforge.net/projects/ma...er/QP1A.190711.148-BACK-TO-STOCK.zip/download

Extract the file and do the same thing as the last step, except deleting the lines in “flashallwipe.bat” containing “_b” instead of “_a”.

Save the file, run it and wait.

Step 3: Flash stock AOSP onto the A slot:

The next thing you have to do is flash a stock AOSP ROM in order to disable verity.

Follow steps 1-6 of this guide: https://xdaforums.com/t/gsi-rom-aosp-android-gsi-support-for-essential-phone.4326297/

Step 4: Flash the Android 12 GSI onto the A slot:

Download and extract this: https://sourceforge.net/projects/an...IAL-treble_arm64_bvS-personal.img.xz/download

Edit: that version has been deleted now and replaced with a version that doesn't work for me at least...

and run

fastboot flash system_a lineage-19.0-20211029-UNOFFICIAL-treble_arm64_bvS-personal.img
fastboot format userdata

Step 5: Install TWRP onto the B slot:

Download: https://dl.twrp.me/mata/twrp-3.2.3-0-mata.img.html

Run:

fastboot set_active b
fastboot flash boot_b twrp-3.2.3-0-mata.img && fastboot reboot

Step 6: Switch slots within TWRP:

At this point you should have TWRP open. Press the “Reboot button” and at the bottom of the new page, click the “Slot A” button. Let it run. Do NOT reboot but go back to the home page.

Step 7: Expand System Partition within TWRP:

By default, the system partition is not large enough to install gapps.

Go to the “Wipe” button in TWRP, “Advanced wipe”, select “System”, then “Repair or change filesystem,” then finally, “resize filesystem”

Step 8: Install GAPPS

Right now, one of the only gapps packages available is NikGapps, downloadable here: https://nikgapps.com/downloads

Choose whichever package you want and download it.

Run: (replacing the zip file with ur filename)

adb push NikGapps-xxxx-xxxxx-xx-xxxxxxxx-signed.zip /sdcard

Within TWRP, click “Install” then your package, then slide to install.

Step 9: Boot into Android 12

Click the “Reboot” button in TWRP, then “System”

This is a part where I’m not 100% sure what happens. You might be able to directly go into Android 12, or it might make you factory wipe the data from your phone (doesn’t affect anything cause you don’t have anything on your phone yet). If it asks you to factory wipe, do that.

Edit: I think doing a standard cache/data wipe in TWRP after installing Gapps prevents bootlooping.

Step 10: Install Magisk

Once you get into Android 12, you pretty much won’t be able to do anything since, by default, the ROM is not Play Protect certified.

You will need to install Magisk and a few modules just do anything.

As of 11/6/21, you need the Canary version of Magisk to support Android 12

Download: https://raw.githubusercontent.com/topjohnwu/magisk-files/canary/app-debug.apk

Open the app, install Magisk by patching the boot.img which was flashed in step 3, and flash the new boot image onto your A slot with:

fastboot flash boot_a magisk_patched-xxxxx_xxxx.img

Step 11: Configure Magisk

In order to have Google believe you are using a certified device, you have do make a few changes.

Open the Magisk App, and go to settings (top right), then scroll down and enable “Zygisk”

Go out of settings into modules and install MagiskHide Props Config

https://github.com/Magisk-Modules-Repo/MagiskHidePropsConf/releases/tag/v6.1.1

SafetyNet doesn’t work yet (as of 11/6/21), the Universal SafetyNet Fix team is working on it with module v2.2.0 which is Patreon only right now.

Step 12: Configure props

Connect your phone to your computer, run

adb shell
su

Accept the prompt on your phone, then run

props

to set up the rest

Do “Edit device fingerprint” and maybe also “Force BASIC key attestation”

Setting both to Essential Phone PH-1 (Android 10) works fine.

Step 13: Certify your ROM

Follow the instructions on this page:

https://www.google.com/android/uncertified/

Step 14: Reboot and hopefully everything works!

If there are any extra steps which don’t need to be done or missing steps, please tell me in a comment!